您的位置:首页 > 移动开发

:app:transformResourcesWithMergeJavaResForDebug FAILED

2016-05-30 12:08 441 查看
资源xml有错误,应该排查每一处xml。

如果提示gradle相关错误,需要修改系统级的build.gradle和程序级的build.gradle,比如后者不能缺少:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:21.0.3'
}

项目配置入口:File->Project Structure--Moules--
修改它就相当于修改程序级的build.gradle

gradle提示中文乱码,比如中文注释。
在项目下的build.gradle下添加以下代码即可解决
tasks.withType(Compile) {
options.encoding = "UTF-8"
}

Gradle2.0+环境下需将Compile改为JavaCompile
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

Duplicate files copied in APK META-INF/NOTICE.txt
android {
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: