对于重复的gradle中的类条目 [英] Duplicate entry for class in gradle
问题描述
,我已经importted其中包含了类的文件夹,但gradle这个给了我这个错误的错误:执行失败的任务:应用程序:packageAllDebugClassesForMultiDex。 > java.util.zip.ZipException:重复的条目:COM / flaviofaria / kenburnsview / MathUtils.class
I am trying to implement ken burns view in android studio in my app, i have importted the folder which contains its classes, but gradle gives me this error Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: duplicate entry: com/flaviofaria/kenburnsview/MathUtils.class
下面是我的build.gradle
Here is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "revamp.revamp2015app"
minSdkVersion 9
targetSdkVersion 21
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:21.0.3'
compile files('libs/Parse-1.5.0.jar')
compile 'com.flaviofaria:kenburnsview:1.0.6'
}
我应该做的,使其运行?
What should i do to make it run ?
推荐答案
以上库已经在行家。
只是删除导入文件夹下面添加到您的依赖关系code:结果
The above library is already on maven.
Just remove the imported folder and add the code below to your dependencies:
编译com.flaviofaria:kenburnsview:1.0.6
compile 'com.flaviofaria:kenburnsview:1.0.6'
有时因下载的问题;库无法下载。在这种情况下 ;只要找到你的.gradle文件夹,并在里面清除缓存。重新编译,就大功告成了。
Sometimes due to downloading issues; the library fails to download. In that case ; just find your .gradle folder and clear cache inside it. Recompile and you are done
这篇关于对于重复的gradle中的类条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!