无法排除 build.gradle 中重复的库依赖项
Can´t exclude duplicated library dependencies in build.gradle
我将多个日历库用于 android 的演示应用程序。
包括 Flexible Calendar and Caldroid, both uses Infinite View Pager 库,它给了我 Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'
因为 f 重复的 class 文件:
java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/antonyt/infiniteviewpager/InfinitePagerAdapter;
所以我启用了 multidex 并试图从其中一个库中排除该库,但我无法获得预期的结果。
我试过了:
compile ('com.p_v:flexiblecalendar:1.2.1'){
exclude group: 'com.antonyt.infiniteviewpager', module: 'library'
}
还有这个
compile ('com.p_v:flexiblecalendar:1.2.1'){
exclude group: 'com.antonyt.infiniteviewpager'
}
还有这个
compile ('com.p_v:flexiblecalendar:1.2.1'){
exclude group: 'antonyt.infiniteviewpager'
}
但它不起作用。我仍然收到 MultiDex 错误
哪一个是完成这个的正确方法?
我将多个日历库用于 android 的演示应用程序。
包括 Flexible Calendar and Caldroid, both uses Infinite View Pager 库,它给了我 Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'
因为 f 重复的 class 文件:
java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/antonyt/infiniteviewpager/InfinitePagerAdapter;
所以我启用了 multidex 并试图从其中一个库中排除该库,但我无法获得预期的结果。
我试过了:
compile ('com.p_v:flexiblecalendar:1.2.1'){
exclude group: 'com.antonyt.infiniteviewpager', module: 'library'
}
还有这个
compile ('com.p_v:flexiblecalendar:1.2.1'){
exclude group: 'com.antonyt.infiniteviewpager'
}
还有这个
compile ('com.p_v:flexiblecalendar:1.2.1'){
exclude group: 'antonyt.infiniteviewpager'
}
但它不起作用。我仍然收到 MultiDex 错误 哪一个是完成这个的正确方法?