Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
705 views
in Technique[技术] by (71.8m points)

linux - Android studio 2.1.2 gradle aapt Syntax error: Unterminated quoted string

I am trying to run Android Studio 2.1.2 on 32bit linux Mint 17.3. Android studio is freshly installed. When I rebuild a project or create a new one, I get errors like this in the Gradle Console:

AAPT err(Facade for 19314581): /home/user/Android/Sdk/build-tools/24.0.1/aapt: 2: /home/user/Android/Sdk/build-tools/24.0.1/aapt: Syntax error: Unterminated quoted string

Aapt is set as executable in build-tools directory.

I have set:

export SLAVE_AAPT_TIMEOUT=30
export ANDROID_EMULATOR_FORCE_32BIT=true

Any other idea how to fix this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I had the same problem. I fixed it by downgrading my build tools version from 24.0.1 to 23.0.3.

  1. Download older build tool version from http://dl.google.com/android/repository/build-tools_r23.0.3-linux.zip
  2. Extract the downloaded file and paste it in your SDK build-tools directory( mostly /home/user/Android/Sdk/build-tools)
  3. Now in your app:gradle file change the buildToolsVersion to "23.0.3"
  4. Sync your gradle file and you should be good to go

Hope google fixes its build-tools bug


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...