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

:app:transformResourcesWithMergeJavaResForDebug FAILED

时间:2016-05-30 12:47:18      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:

资源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‘
    }
}

:app:transformResourcesWithMergeJavaResForDebug FAILED

标签:

原文地址:http://www.cnblogs.com/exmyth/p/5541969.html

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