5

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?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Athwale
  • 68
  • 1
  • 6
  • Try running gradle with " --debug --stacktrace " options to get better idea what is going on. More info about the error would be nice, or the code itself (github repo?) – ph4r05 Aug 03 '16 at 08:32
  • I have the exact problem and @ph4r05 I tried that and got the same log as posted. – EdmDroid Aug 10 '16 at 17:17

2 Answers2

6

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

Jobin Lawrance
  • 708
  • 1
  • 7
  • 11
  • Thanks - this fixed it for me, too. Being new to this, I couldn't find the app:gradle file, so instead moved the original build tools (25.0.1) into a directory called ~/Android/Sdk/build-tools/_not-working. This produced a warning, but the 25.0.1 build tools weren't used, meaning the build still went ahead. – Will Voelcker Dec 02 '16 at 12:03
  • I tried to build a project on Windows with build-tools version 25 and it works. But the same version in linux doesn't work. So as mentioned John you must install version 23.0.3 and works. But the step 2 you can do it from sdk manager. You select install build-tools version 23.0.3 package. – axmug Jan 17 '17 at 11:59
3

It might be the case the newest Android Studio does not run on 32bit only system. On AndroidStudio download page the requirements for Linux are:

64-bit distribution capable of running 32-bit applications

There are also other StackOverflow questions regarding this:

The former one states:

Either one will allow you to use the 32-bit binaries,but please be aware that these will disappear in a future Android SDK release. Consider moving to a 64-bit Linux system before that happens.

So it might be the case the newest version does not support 32bit anymore. Please try suggestions mentioned in the related answers (updating kernel/system). For Linux Mint there is mentioned [1]:

  1. Go to terminal
  2. type gedit .profile
  3. paste the below line at end of the page
  4. export ANDROID_EMULATOR_FORCE_32BIT=true
  5. type source .profile in terminal or restart system

But it also might be the case the newest Android Studio version does not support 32bit-only system anymore. In that case try to use an older version.

Community
  • 1
  • 1
ph4r05
  • 1,826
  • 1
  • 18
  • 15