:app:transformResourcesWithMergeJavaResForDebug FAILED


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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM