【发布时间】:2016-01-20 11:22:48
【问题描述】:
将 Sugar ORM 依赖添加到 gradle 脚本应用文件后
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.github.satyan:sugar:1.4'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:design:23.1.1'
}
Gradle 编译了我的项目,但是一旦我尝试在物理设备中运行它(通过 Android Studio),我得到了这个错误:
错误:您的应用程序引用的方法数量超过了单个 dex 文件所能容纳的数量。 见https://developer.android.com/tools/building/multidex.html
如果我尝试使用 Sugar ORM 1.3 编译和运行应用程序,现在会出现错误
这个库在 1.4 版中变得如此之大以至于不再适合单个 DEX 了吗?
【问题讨论】: