我的Android /應用/的build.gradle(底部):火力地堡Onesignal多DEX文件定義LCOM /谷歌/安卓/ GMS /認證/ API /登入/ ZZC
dependencies {
compile project(':react-native-onesignal')
compile project(':react-native-youtube')
compile(project(":react-native-google-sign-in")) {
exclude group: "com.google.android.gms"
}
compile project(':react-native-svg')
compile project(':react-native-facebook-login')
compile project(':react-native-i18n')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.google.android.gms:play-services-auth:10.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
我的Android /的build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
錯誤:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/auth/api/signin/zzc;
我已經嘗試了各種解決方案,並沒有什麼作品:/ 似乎是某種版本misma的tch,但我不知道如何匹配它。
我創建了一個文件Multi_Dex.java,但現在我得到一個錯誤「Multi_Dex.java:6:error:can not find symbol」for「Context」和「MultiDex」 –