Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
707 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 Reply

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...