app_downloadfile:transformResourcesWithMergeJavaResForDebug
来源:互联网 发布:星际争霸数据 编辑:程序博客网 时间:2024/05/16 17:46
其实我在导包过程中,不光遇到了上篇博文的问题,还遇到了,这个错误
Error:Execution failed for task ':app_downloadfile:transformResourcesWithMergeJavaResForDebug'.> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE.txt File1: E:\AndroidStudioProjects\My_Application2\app_downloadfile\src\main\res\httpclient-4.2.5.jar File2: E:\AndroidStudioProjects\My_Application2\app_downloadfile\src\main\res\httpcore-4.2.4.jar
其中httpclient-4.2.5.jar,httpcore-4.2.4.jar是我导入的两个jar包,然后百度得到了一段祖传代码,因为我也不知道有什么作用,看起来和我加入的jar包并没有什么关系!答主叫我加在对应Module的build.gradle里面,就像这样:
apply plugin: 'com.android.application'android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.example.yuxin.app_downloadfile" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }}//android{//// packagingOptions{// exclude'META-INF/DEPENDENCIES.txt'// exclude'META-INF/LICENSE.txt'// exclude'META-INF/NOTICE.txt'// exclude'META-INF/NOTICE'// exclude'META-INF/LICENSE'// exclude'META-INF/DEPENDENCIES'// exclude'META-INF/notice.txt'// exclude'META-INF/license.txt'// exclude'META-INF/dependencies.txt'// exclude'META-INF/LGPL2.1'// }//}dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile files('src/main/res/httpcore-4.2.4.jar') compile files('src/main/res/httpclient-4.2.5.jar')}
其中注释的那段代码就是获得的祖传代码。
好了,问题解决了!我爱这个世界。
我的博客网站:http://huyuxin.top/欢迎大家访问!评论!
0 0
- app_downloadfile:transformResourcesWithMergeJavaResForDebug
- transformResourcesWithMergeJavaResForDebug
- app:transformResourcesWithMergeJavaResForDebug
- app:transformResourcesWithMergeJavaResForDebug
- 解决transformResourcesWithMergeJavaResForDebug问题
- Error:Execution failed for task ':transformResourcesWithMergeJavaResForDebug'
- Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
- Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
- 解决 Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
- Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
- Android--Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
- Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
- Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
- Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
- 解决:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
- Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
- Error:Execution failed for task ':testPic:transformResourcesWithMergeJavaResForDebug'.
- Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
- java中String、StringBuffer、StringBuilder的区别
- HTTP协议详解(真的很经典)
- 光标快捷键组合(备用)
- redis在centOS系统上的集群搭建
- 100万并发连接服务器笔记之1M并发连接目标达成
- app_downloadfile:transformResourcesWithMergeJavaResForDebug
- 英语学习(一)
- 计蒜客 腾讯手机地图(模拟 数学)
- The reference to entity "characterEncoding" must end with the ';' delimiter
- 跳表原理
- RESTful API 设计指南
- 【Android问题】解决 Android SDK下载和更新失败“Connection to https://dl-ssl.google.com refused”的问题
- 常用adb命令
- Android EditText图文混排的总结