Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FAILURE: Build failed with exception

> Executing tasks: [:app:assembleDebug]
> 
> WARNING: The option 'android.enableAapt2' is deprecated and should not
> be used anymore. Use 'android.enableAapt2=true' to remove this
> warning. It will be removed at the end of 2018. :app:preBuild
> UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:compileDebugAidl
> UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE
> :app:checkDebugManifest UP-TO-DATE :app:generateDebugBuildConfig
> UP-TO-DATE :app:prepareLintJar UP-TO-DATE
> :app:mainApkListPersistenceDebug UP-TO-DATE
> :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources
> UP-TO-DATE :app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT error: check logs for details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

> BUILD FAILED in 13s 9 actionable tasks: 1 executed, 8 up-to-date
like image 602
royalapp Avatar asked Feb 17 '18 13:02

royalapp


2 Answers

In gradle.properties change android.enableAapt2=false to true

like image 163
Luvnish Monga Avatar answered Nov 04 '22 09:11

Luvnish Monga


You can actually have problems in the resources but these will not be displayed if you do not correct this problem first:

The option 'android.enableAapt2' is deprecated and should not be used anymore. Use 'android.enableAapt2 = true' to remove this warning. It will be removed at the end of 2018.

within your gradle.properties file that is located in the root of the project, replace:

android.enableAapt2 

with:

android.enableAapt2 = true
like image 31
Jorgesys Avatar answered Nov 04 '22 08:11

Jorgesys