码迷,mamicode.com
首页 > 移动开发 > 详细

Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

时间:2018-06-24 17:58:17      阅读:541      评论:0      收藏:0      [点我收藏+]

标签:oid   source   roc   cts   enable   multi   sed   The   pre   

环境

Android Studio 3.0 升级&导入项目

错误

Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Error:Execution failed for task ‘:app:mergeAnzhiDebugResources‘.
> Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for     details

技术分享图片

解决

关闭AAPT2编译

在gradle.properties文件中添加:

android.enableAapt2=false

如果导入的项目没有该文件(比如Eclipse),需手动创建,或者在AS自己创建的项目下拷贝该文件,文件内容如下:

# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured     through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

技术分享图片

Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

标签:oid   source   roc   cts   enable   multi   sed   The   pre   

原文地址:https://www.cnblogs.com/lifan1998/p/9220941.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!