Android的工作室1.0.1在APK META-INF /复制相关内容重复文件 [英] ِAndroid Studio 1.0.1 Duplicate files copied in APK META-INF/DEPENDENCIES

查看:246
本文介绍了Android的工作室1.0.1在APK META-INF /复制相关内容重复文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装的Andr​​oid Studio版本1.0.1并试图从Eclipse导入我的项目它,它给了我以下错误:

 错误:执行失败的任务:应用程序:packageDebug。
 在重复APK META-INF /相关内容复制的文件
 文件1:E:\\ APP3 \\程序\\库\\ httpmime-4.3.jar
 文件2:E:\\ APP3 \\程序\\库\\ httpmime,4.3.jar``

我试图导入我的项目使用转换罐子选项既摇篮,没有将它们转换
我搜索了很多,在网上试图解决方案,但也没有工作
这里是我的build.gradle为我的项目

 应用插件:'com.android.application

安卓{
    compileSdkVersion 20
    buildToolsVersion20.0.0

  defaultConfig {
    的applicationIDcom.FluoraPin.androidApp
    14的minSdkVersion
    targetSdkVersion 21
}buildTypes {
    发布 {
        minifyEnabled假
        proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard的-rules.txt
    }
}
}    安卓{
    packagingOptions {
        排除META-INF /注意事项
    }
}依赖{
    编制项目(':beyondAR_Framework')
    编制项目(':facebookSDK')
    编制项目(':凌空)
    编译com.android.support:support-v4:20.0.0
    编译com.android.support:appcompat-v7:19.1.0
    编译文件(库/的commons-logging-1.1.3.jar')
    编译文件(库/ HttpClient的-4.3.6.jar')
    编译文件(库/ HttpClient的缓存-4.3.6.jar')
    编译文件(库/的HttpCore-4.3.3.jar')
    编译文件(库/ httpmime-4.3.jar')
    编译文件(库/毕加索-2.3.4.jar')
    编译文件(库/改造-1.8.0.jar')
}


解决方案

添加

 安卓{
    packagingOptions {
        排除META-INF /相关内容
        排除META-INF / LICENSE
        排除META-INF / LICENSE.TXT
        排除META-INF / LICENSE.TXT
        排除META-INF /注意事项
        排除META-INF / NOTICE.txt
        排除META-INF / notice.txt
        排除META-INF / ASL2.0
    }
}

应该解决您的问题。

I installed Android Studio version 1.0.1 and tried to import my project from eclipse to it it gave me the following error:

 Error:Execution failed for task ':app:packageDebug'.
 Duplicate files copied in APK META-INF/DEPENDENCIES
 File 1: E:\app3\app\libs\httpmime-4.3.jar
 File 2: E:\app3\app\libs\httpmime-4.3.jar``

I've tried to import my project with both using converting jars option to gradle and without converting them i've searched a lot and tried solutions online but also didn't work here is my build.gradle for my project

apply plugin: 'com.android.application'

android { compileSdkVersion 20 buildToolsVersion "20.0.0"

defaultConfig {
    applicationId "com.FluoraPin.androidApp"
    minSdkVersion 14
    targetSdkVersion 21
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}

    android {
    packagingOptions {
        exclude 'META-INF/NOTICE'
    }
}

dependencies {
    compile project(':beyondAR_Framework')
    compile project(':facebookSDK')
    compile project(':volley')
    compile 'com.android.support:support-v4:20.0.0'
    compile 'com.android.support:appcompat-v7:19.1.0'
    compile files('libs/commons-logging-1.1.3.jar')
    compile files('libs/httpclient-4.3.6.jar')
    compile files('libs/httpclient-cache-4.3.6.jar')
    compile files('libs/httpcore-4.3.3.jar')
    compile files('libs/httpmime-4.3.jar')
    compile files('libs/picasso-2.3.4.jar')
    compile files('libs/retrofit-1.8.0.jar')
}

解决方案

adding

android {
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
    }
}

should solve your problem.

这篇关于Android的工作室1.0.1在APK META-INF /复制相关内容重复文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆