FAILURE: Build failed with exception

royalapp picture royalapp · Feb 17, 2018 · Viewed 35.5k times · Source
> 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

Answer

Luvnish Monga picture Luvnish Monga · Apr 24, 2018

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