【问题标题】:Multiple dex files define Lcom/google/android/gms/internal/zzpo多个dex文件定义Lcom/google/android/gms/internal/zzpo
【发布时间】:2016-09-06 12:55:14
【问题描述】:

我的代码运行良好,构建应用程序也很好,然后在从 Android SDK 管理器更新以下给定库后突然出现错误

额外 > Google Play 服务

额外 > 谷歌存储库

我已经实现了cordova plugin googlefit 和插件cordova plugin healthkit

build.gradle 文件中的依赖项

依赖{

    compile fileTree(dir: 'libs', include: '*.jar')

    debugCompile project(path: "CordovaLib", configuration: "debug")

    releaseCompile project(path: "CordovaLib", configuration: "release")

    compile "com.google.android.gms:play-services-fitness:9.4.0"

    compile "com.google.android.gms:play-services:7.5.0+"

}

我已经尝试过 android 平台删除并重新添加它

我无法使用此命令构建应用程序

离子构建安卓

【问题讨论】:

  • 当您在 android 项目中包含太多方法时会发生这种情况。您可以将 multiDexEnabled:true 添加到您的 build.gradle 中,但这不是最佳解决方案。您应该删除 play-services:7.5.0+ 并仅添加您需要的内容(例如:play-services-fitness
  • 你能试试这个解决方案吗stackoverflow.com/questions/26342444/…

标签: android angularjs cordova ionic-framework cordova-plugins


【解决方案1】:

将此添加到您的应用程序 build.gradle defaultConfig 部分

multiDexEnabled true

【讨论】:

    猜你喜欢
    • 2018-07-01
    • 2017-08-14
    • 2018-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-15
    相关资源
    最近更新 更多