Search code examples
javaandroidlinuxandroid-studioaapt

Gradle aapt error: syntax ")" not found on Android Studio 1.5.1 Linux


Unburden

First of all, I would like to unburden: Android Studio completely sucks and it is by far the worst big IDE I've used all my life long! I got stuck on errors just for opening that thing! And when I have hardly fixed one, seventeen new ones come rightly from the hell to my screen! I am (trying) to use that piece of [you know] for 4 days now, and till now I was not able to code one single line of code! What does an IDE is supposed to be useful for again?

-- Edit1: I just installed the full 1.4.1 version right now and first thing it showed me was: WizardException: Ignoring unknown package filter 'source-25' and others errors.

-- Edit2: I did a new FRESH Mint 18 install in a completely clean partition, installed only Java 7 (Oracle) and tried to run the AS-1.5.1 but... the same error on install and a subtle different log of error messages (please, see the log here) when gradleing.

The problem

Ok, the last problem (1.5.1) is that now I am trying to make gradle to build the "project" (it is just an empty activity created by the wizard, default code untouched) and I get this error:

~/AndroidStudioProjects/MyApplication $ gradle clean build --stacktrace
Incremental java compilation is an incubating feature.
:clean UP-TO-DATE
:app:clean
//...[other succesfull msgs here]...
:app:mergeDebugResourcesAAPT err(Facade for 16120822): /home/sidney/Android/Sdk/build-tools/25.0.0/aapt: 3: /home/sidney/Android/Sdk/build-tools/25.0.0/aapt: Syntax error: Unterminated quoted string
AAPT err(Facade for 22545775): /home/sidney/Android/Sdk/build-tools/25.0.0/aapt: 3: /home/sidney/Android/Sdk/build-tools/25.0.0/aapt: Syntax error: Unterminated quoted string
//...[other repeated errors here]...
Exception in thread "png-cruncher_8" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /home/sidney/Android/Sdk/build-tools/25.0.0/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 60 seconds
        at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
        at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
        at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
        at java.lang.Thread.run(Thread.java:745)
//...[other repeated errors here]...

--- UPDATE: Please, see this other log of the external terminal used to run AS ---

What I've tried to solve that:

  • Install aapt system-wide;
  • Switch from Java 8 to Java 7;
  • Change gradle to off-line;
  • Change JDK configs to switch from the AS one to the system one;
  • Set SLAVE_AAPT_TIMEOUT to 30 (I changed back as you can see in the log link)
  • Set ANDROID_EMULATOR_FORCE_32BIT to true;
  • Install via ubuntu-make and also via ppa;
  • And so many others things I could find over Internet.

Environment specs

  • Linux Mint 18 (32 bits)
  • AS 1.5.1 (now (trying to use) 2.1.0)
  • Java Oracle 8 (Already tried the 7)

Why don't I just switch to Eclipse with plug-in

I have a course in mind (in Udacity) and they use that "thing" and it is a prerequisite. I've sent 3 e-mails to them questioning about the possibility of use other IDEs but without answer after 4 days, unfortunately.

Thank you so much for any help!


Solution

  • My solution? Buy a 64 bits laptop! No installation error, no gradle error, no java error, no error anymore.