android build failed
来源:互联网 发布:c语言最大公约数的算法 编辑:程序博客网 时间:2024/06/14 07:13
问题1:
Warning:Conflict with dependency 'com.google.code.findbugs:jsr305'. Resolved versions for app (3.0.1) and test app (2.0.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
原因分析:
使用第三方的插件,但是插件在定义自身依赖时,使用[version+]策略,导致永远下载最新的依赖但是该插件所指定仓库并没有最新版本的依赖,从而导致构建失败。
解决方案:
Gradle强制依赖解析策略,指定某个依赖必须是这个版本
参考:
http://www.voidcn.com/blog/BenW1988/article/p-5011566.html
问题2:导入AAR
解决方案
1、把aar文件放在一个文件目录内,比如就放在libs目录内2、在app的build.gradle文件添加如下内容repositories { flatDir { dirs 'libs' //this way we can find the .aar file in libs folder }}3、之后在其他项目中添加一句gradle依赖便方便的引用了该librarydependencies { compile(name:'test', ext:'aar')}
参考
http://stormzhang.com/android/2015/03/01/android-reference-local-aar/
问题3:transformResourcesWithMergeJavaResForDebug
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/rxjava.properties File1: C:\Users\gzh_006\.gradle\caches\modules-2\files-2.1\io.reactivex\rxjava\1.1.5\ece7b5d0870e66d8226dab6dcf47a2b12afff061\rxjava-1.1.5.jar File2: C:\Users\gzh_006\.gradle\caches\modules-2\files-2.1\io.reactivex.rxjava2\rxjava\2.0.1\57f850a6b317e5582f1dbaff10a9e7d7e1fcdcfb\rxjava-2.0.1.jar
解决方案
//build.gradle android 节点下packagingOptions { exclude 'META-INF/rxjava.properties'}
0 0
- android build failed
- Android Studio升级后工程Build failed.
- Android Studio-build错误:app:mergeDebugResources FAILED
- [Android][Build Problems] failed to find build tools revision & failed to find target android 等问题解决
- Failed Android build: “error: relocation overflow in R_ARM_THM_CALL”
- Android Studio BUILD FAILED finished with non-zero exit value
- Android Exception: Build failed,unaligned.apks 拒绝访问
- Execution failed for task ':transformClassesWithJarMergingForDebug'. > com.android.build.api.transfo
- Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. > com.android.build
- Android Studio 中 FAILURE: Build failed with an exception.
- android studio Execution failed for clean build失败 open editor
- 使用cocos compile -p android时总是报错误 BUILD FAILED \ant\build.xml:892
- Android Studio 常见 Build 问题 Error:failed to find Build Tools revision 23.0.2
- Android Studio 常见 Build 问题 Error:failed to find Build Tools revision 23.0.2
- Android Studio 常见 Build 问题 Error:failed to find Build Tools revision 23.0.2
- Android Studio 常见 Build 问题 Error:failed to find Build Tools revision 23.0.2
- Android Studio 常见 Build 问题 Error:failed to find Build Tools revision 23.0.2
- Android Studio 常见 Build 问题 Error:failed to find Build Tools revision 23.0.2
- mysql使用中遇到的问题
- iOS开发中断言的使用—NSAssert()
- JAVA基础—格式化数字DecimalFormat
- leetcode---Additive Number
- Linux 内核设备驱动之GPIO驱动之GPIO sysfs支持
- android build failed
- PyPDF2提取pdf书签
- POJ 2665 Trees G++
- ios开发 数组排序——根据数组内字典的指定属性排序
- 10个对开发项目有害的编程习惯
- Hwadee实训--day11
- 七牛robots正确写法
- 统计字符串字符个数
- codeforces 402 E