【发布时间】:2016-02-26 22:35:28
【问题描述】:
我刚刚从过去 1 个月开始Android Studio。使用 gradle 可以很好地工作并提供更多功能。
但我有一个问题。
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.0.0'
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.google.android.gms:play-services:+'
compile files('libs/gcm.jar')
}
在App gradle 中,我们一一添加依赖项。
所以我的问题是在build.gradle 文件中添加依赖项是否有任何限制?
我们可以添加的最大数量。如果我们添加很多依赖,那么它会抛出错误
Conversion to Dalvik format failed:
Unable to execute dex: method ID not in [0, 0xffff]: 65536
提前帮助将被appriciated!!
【问题讨论】:
-
没有限制。但是你应该关心
65K reference limit,为此你需要Multidex build support。
标签: android android-studio dependencies