1

This was the error shown while building the apk. please help to solve this. i just change my build:gradle to 3.3.0 and the error has shown up

Caused by: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.

0-5013011-linux Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
    at com.android.builder.internal.aapt.v2.Aapt2Daemon.handleError(Aapt2Daemon.kt:148)
    at com.android.builder.internal.aapt.v2.Aapt2Daemon.checkStarted(Aapt2Daemon.kt:57)
    at com.android.builder.internal.aapt.v2.Aapt2Daemon.compile(Aapt2Daemon.kt:79)
    at com.android.builder.internal.aapt.v2.Aapt2DaemonManager$LeasedAaptDaemon.compile(Aapt2DaemonManager.kt:170)
    at com.android.build.gradle.internal.res.Aapt2CompileWithBlameRunnable$run$1.invoke(Aapt2CompileWithBlameRunnable.kt:37)
    at com.android.build.gradle.internal.res.Aapt2CompileWithBlameRunnable$run$1.invoke(Aapt2CompileWithBlameRunnable.kt:28)
    at com.android.build.gradle.internal.res.namespaced.Aapt2DaemonManagerService.useAaptDaemon(Aapt2DaemonManagerService.kt:71)
    at com.android.build.gradle.internal.res.namespaced.Aapt2DaemonManagerService.useAaptDaemon$default(Aapt2DaemonManagerService.kt:69)
    at com.android.build.gradle.internal.res.Aapt2CompileWithBlameRunnable.run(Aapt2CompileWithBlameRunnable.kt:34)
    at com.android.ide.common.workers.ExecutorServiceAdapter$submit$submission$1.run(ExecutorServiceAdapter.kt:39)
    at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.android.builder.internal.aapt.v2.Aapt2InternalException: Failed to start AAPT2 process.
    at com.android.builder.internal.aapt.v2.Aapt2DaemonImpl.stopQuietly(Aapt2DaemonImpl.kt:124)
    at com.android.builder.internal.aapt.v2.Aapt2DaemonImpl.startProcess(Aapt2DaemonImpl.kt:111)
    at com.android.builder.internal.aapt.v2.Aapt2Daemon.checkStarted(Aapt2Daemon.kt:53)
    ... 13 more
Caused by: java.io.IOException: Process unexpectedly exit.
    at com.android.builder.internal.aapt.v2.Aapt2DaemonImpl.startProcess(Aapt2DaemonImpl.kt:112)
    ... 14 more
Zoe
  • 27,060
  • 21
  • 118
  • 148
Sharon Joshi
  • 498
  • 7
  • 19
  • Possible duplicate of [Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details](https://stackoverflow.com/questions/46988102/errorcom-android-tools-aapt2-aapt2exception-aapt2-error-check-logs-for-detail) – Filip123go Feb 26 '19 at 10:31
  • Please check this answer here : [AAPT2 ERROR](https://stackoverflow.com/questions/46988102/errorcom-android-tools-aapt2-aapt2exception-aapt2-error-check-logs-for-detail) – Filip123go Feb 26 '19 at 10:33
  • 2
    @Filip123go it's not a duplicate of that... It mentions what happens if AAPT2 shows a compiler error (AKA there's something wrong with the *code*), but here there's something wrong with AAPT2 itself. – Zoe Feb 26 '19 at 11:28
  • Have you add this on gradle.properties file `android.enableAapt2=false`? – Faysal Ahmed Feb 26 '19 at 11:34
  • In 3.3 there was a bug with aapt2 crashing on very large drawables. Check your log - it should say which file it's failing to compile. If it's a png file it's probably this bug - the fix is just to update to the newest 3.4 canary. – Izabela Orlowska Feb 26 '19 at 14:52
  • i just found the solution. In my case, i just upgrade my Linux from 32 to 64 bit. The cause of this problem was-AAPT2 in >3.1 versions will only be executable in 64 bit OS and also the android Studio just removed the support of 32 bit Linux in its updated versions – Sharon Joshi Mar 15 '19 at 10:35

1 Answers1

3

i just found the solution. In my case,

i just upgrade my Linux from 32 to 64 bit

And reinstalled studio. the The cause of this problem was-AAPT2 in >3.1 versions will only be executable in 64 bit OS and also

the android Studio just removed the support of 32 bit Linux from in its updated versions

I think this will be help full to some one who has the same problem while building the project to apk file and hope you guys will help me to improve this answer,edits are invited. Thank you in advance

Sharon Joshi
  • 498
  • 7
  • 19
  • 1
    Android Studio never supported linux 32 bit. It only supports windows 32 and 64 bit, macOS 64 bit and linux 64 bit. The only recent change was to update the documentation to make it more clear. – Izabela Orlowska Mar 15 '19 at 10:50