.dex文件中的方法引用数不能超过64k API 17我正在使用SugarORM Library构建一个应用程序但是当我尝试为API 17构建项目时(没有检查其他人)它显示了构建错误。 Information:Gradle tasks [:app:assembleDebug]:app:preBuild UP-TO-DATE:app:preDebugBuild UP-TO-DATE:app:checkDebugManifest:app:preReleaseBuild UP-TO-DATE:app:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE:app:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE:app:prepareComAndroidSupportCardviewV72330Library UP-TO-DATE:app:prepareComAndroidSupportDesign2330Library UP-TO-DATE:app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE:app:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE:app:prepareComAndroidSupportSupportV42330Library UP-TO-DATE:app:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE:app:prepareComAndroidVolleyVolley100Library UP-TO-DATE:app:prepareComGithubSatyanSugar14Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServices840Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesAds840Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE但是当我为android v5.0或更高版本构建这个项目时,它运行正常。如果我删除SugarORM gradle依赖项,它对于v4.2.2和v5.0设备都可以正常工作。
3 回答
慕侠2389804
TA贡献1719条经验 获得超6个赞
在android / app / build.gradle中
android {compileSdkVersion 23 buildToolsVersion '23.0.0' defaultConfig { applicationId "com.dkm.example" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" multiDexEnabled true }
把它放在你的defaultConfig中:
multiDexEnabled true
这个对我有用
- 3 回答
- 0 关注
- 385 浏览
添加回答
举报
0/150
提交
取消