I have a game in Unity that I am compiling for Android. I encountered a few building issues previously but these were resolved with the addition of the build.gradle file. However, all of a sudden I am yet again unable to build the project and I am encountering the following error: Multiple dex files define
我有一个统一的游戏,我正在为Android编写。我以前遇到过一些构建问题,但是这些问题都是通过添加构建解决的。gradle文件。然而,突然之间,我再次无法构建项目,我遇到了以下错误:多个dex文件定义
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_121\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleDebug"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':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 Landroid/support/v4/app/BackStackRecord$Op;
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 5s
]
stdout[
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Matth\AppData\Local\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Matth\AppData\Local\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:extractProguardFiles
:preReleaseBuild
:prepareComAndroidSupportSupportCompat2520Library
:prepareComAndroidSupportSupportCoreUi2520Library
:prepareComAndroidSupportSupportCoreUtils2520Library
:prepareComAndroidSupportSupportFragment2520Library
:prepareComAndroidSupportSupportMediaCompat2520Library
:prepareComAndroidSupportSupportV42520Library
:prepareComGoogleAndroidGmsPlayServicesBase1180Library
:prepareComGoogleAndroidGmsPlayServicesBaseLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesBasement1180Library
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesTasks1180Library
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1180Library
:prepareComGoogleFirebaseFirebaseAnalytics1180Library
:prepareComGoogleFirebaseFirebaseAnalyticsImpl1180Library
:prepareComGoogleFirebaseFirebaseAnalyticsImplLicense1180Library
:prepareComGoogleFirebaseFirebaseAnalyticsLicense1180Library
:prepareComGoogleFirebaseFirebaseAnalyticsUnity443Library
:prepareComGoogleFirebaseFirebaseAppUnity443Library
:prepareComGoogleFirebaseFirebaseAuth1180Library
:prepareComGoogleFirebaseFirebaseAuthLicense1180Library
:prepareComGoogleFirebaseFirebaseAuthUnity443Library
:prepareComGoogleFirebaseFirebaseCommon1180Library
:prepareComGoogleFirebaseFirebaseCommonLicense1180Library
:prepareComGoogleFirebaseFirebaseCore1180Library
:prepareComGoogleFirebaseFirebaseIid1180Library
:prepareComGoogleFirebaseFirebaseIidLicense1180Library
:prepareFacebookAndroidSdk470Library
:prepareFacebookAndroidWrapperReleaseLibrary
:prepareUnityAdsLibrary
:Firebase:preBuild UP-TO-DATE
:Firebase:preReleaseBuild UP-TO-DATE
:Firebase:checkReleaseManifest
:Firebase:prepareReleaseDependencies
:Firebase:compileReleaseAidl
:Firebase:compileReleaseNdk NO-SOURCE
:Firebase:compileLint
:Firebase:copyReleaseLint NO-SOURCE
:Firebase:mergeReleaseShaders
:Firebase:compileReleaseShaders
:Firebase:generateReleaseAssets
:Firebase:mergeReleaseAssets
:Firebase:mergeReleaseProguardFiles UP-TO-DATE
:Firebase:packageReleaseRenderscript NO-SOURCE
:Firebase:compileReleaseRenderscript
:Firebase:generateReleaseResValues
:Firebase:generateReleaseResources
:Firebase:packageReleaseResources
:Firebase:processReleaseManifest
:Firebase:generateReleaseBuildConfig
:Firebase:processReleaseResources
:Firebase:generateReleaseSources
:Firebase:incrementalReleaseJavaCompilationSafeguard
:Firebase:javaPreCompileRelease
:Firebase:compileReleaseJavaWithJavac
:Firebase:processReleaseJavaRes NO-SOURCE
:Firebase:transformResourcesWithMergeJavaResForRelease
:Firebase:transformClassesAndResourcesWithSyncLibJarsForRelease
:Firebase:mergeReleaseJniLibFolders
:Firebase:transformNativeLibsWithMergeJniLibsForRelease
:Firebase:transformNativeLibsWithSyncJniLibsForRelease
:Firebase:bundleRelease
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest
:processDebugResources
:generateDebugSources
:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:javaPreCompileDebug
:compileDebugJavaWithJavac UP-TO-DATE
:compileDebugNdk NO-SOURCE
:compileDebugSources UP-TO-DATE
:mergeDebugShaders UP-TO-DATE
:compileDebugShaders UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
:transformClassesWithDexForDebug FAILED
69 actionable tasks: 59 executed, 10 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error)
UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I have the following Build.Gradle file in the top level of my project (outside the Assets folder and alongside the c# project and solutions)
我有以下构建。我项目的顶层的渐变文件(在Assets文件夹之外,在c#项目和解决方案旁边)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.google.gms:google-services:3.0.0'
}
}
My module Build.Gradle located (Assets/Plugin/Android) contains the following
我的模块构建。等级(资产/插件/Android)包含以下内容
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24"
defaultConfig {
applicationId "com.example.app"
minSdkVersion 14
targetSdkVersion 24
versionCode 2
versionName "0.9"
}
buildTypes {
///
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-crash:9.2.1'
compile 'com.google.android.gms:play-services-auth:9.2.1'
compile(project(":react-native-google-signin")) {
exclude group: "com.google.android.gms"
exclude group: "com.google.firebase"
}
}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
EDIT. I have unchecked Development build in Unity and I get a different error:
编辑。我在Unity中不受限制地构建开发,我得到了一个不同的错误:
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_121\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
Note: there were 11 duplicate class definitions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced class android.app.NotificationChannel
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced method 'android.app.Notification$Builder setChannelId(java.lang.String)' in library class android.app.Notification$Builder
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced class android.app.NotificationChannel
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced class android.app.NotificationChannel
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced class android.app.NotificationChannel
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced method 'void createNotificationChannel(android.app.NotificationChannel)' in library class android.app.NotificationManager
Warning: com.google.android.gms.common.GoogleApiAvailability: can't find referenced method 'android.app.NotificationChannel getNotificationChannel(java.lang.String)' in library class android.app.NotificationManager
Warning: com.google.android.gms.internal.zzbhd: can't find referenced method 'boolean isInstantApp()' in library class android.content.pm.PackageManager
Warning: com.google.android.gms.internal.zzbhe: can't find referenced method 'boolean isInstantApp(java.lang.String)' in library class android.content.pm.PackageManager
Warning: there were 4 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: there were 5 unresolved references to library class members.
You probably need to update the library versions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 11s
]
stdout[
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Matth\AppData\Local\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Matth\AppData\Local\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
:preBuild UP-TO-DATE
:extractProguardFiles
:preReleaseBuild
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:prepareComAndroidSupportSupportCompat2520Library
:prepareComAndroidSupportSupportCoreUi2520Library
:prepareComAndroidSupportSupportCoreUtils2520Library
:prepareComAndroidSupportSupportFragment2520Library
:prepareComAndroidSupportSupportMediaCompat2520Library
:prepareComAndroidSupportSupportV42520Library
:prepareComGoogleAndroidGmsPlayServicesBase1180Library
:prepareComGoogleAndroidGmsPlayServicesBaseLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesBasement1180Library
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesTasks1180Library
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1180Library
:prepareComGoogleFirebaseFirebaseAnalytics1180Library
:prepareComGoogleFirebaseFirebaseAnalyticsImpl1180Library
:prepareComGoogleFirebaseFirebaseAnalyticsImplLicense1180Library
:prepareComGoogleFirebaseFirebaseAnalyticsLicense1180Library
:prepareComGoogleFirebaseFirebaseAnalyticsUnity443Library
:prepareComGoogleFirebaseFirebaseAppUnity443Library
:prepareComGoogleFirebaseFirebaseAuth1180Library
:prepareComGoogleFirebaseFirebaseAuthLicense1180Library
:prepareComGoogleFirebaseFirebaseAuthUnity443Library
:prepareComGoogleFirebaseFirebaseCommon1180Library
:prepareComGoogleFirebaseFirebaseCommonLicense1180Library
:prepareComGoogleFirebaseFirebaseCore1180Library
:prepareComGoogleFirebaseFirebaseIid1180Library
:prepareComGoogleFirebaseFirebaseIidLicense1180Library
:prepareFacebookAndroidSdk470Library
:prepareFacebookAndroidWrapperReleaseLibrary
:prepareUnityAdsLibrary
:Firebase:preBuild UP-TO-DATE
:Firebase:preReleaseBuild UP-TO-DATE
:Firebase:checkReleaseManifest
:Firebase:prepareReleaseDependencies
:Firebase:compileReleaseAidl
:Firebase:compileReleaseNdk NO-SOURCE
:Firebase:compileLint
:Firebase:copyReleaseLint NO-SOURCE
:Firebase:mergeReleaseShaders
:Firebase:compileReleaseShaders
:Firebase:generateReleaseAssets
:Firebase:mergeReleaseAssets
:Firebase:mergeReleaseProguardFiles
:Firebase:packageReleaseRenderscript NO-SOURCE
:Firebase:compileReleaseRenderscript
:Firebase:generateReleaseResValues
:Firebase:generateReleaseResources
:Firebase:packageReleaseResources
:Firebase:processReleaseManifest
:Firebase:generateReleaseBuildConfig
:Firebase:processReleaseResources
:Firebase:generateReleaseSources
:Firebase:incrementalReleaseJavaCompilationSafeguard
:Firebase:javaPreCompileRelease
:Firebase:compileReleaseJavaWithJavac
:Firebase:processReleaseJavaRes NO-SOURCE
:Firebase:transformResourcesWithMergeJavaResForRelease
:Firebase:transformClassesAndResourcesWithSyncLibJarsForRelease
:Firebase:mergeReleaseJniLibFolders
:Firebase:transformNativeLibsWithMergeJniLibsForRelease
:Firebase:transformNativeLibsWithSyncJniLibsForRelease
:Firebase:bundleRelease
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard
:javaPreCompileRelease
:compileReleaseJavaWithJavac
:compileReleaseNdk NO-SOURCE
:compileReleaseSources
:lintVitalRelease
:mergeReleaseShaders
:compileReleaseShaders
:generateReleaseAssets
:mergeReleaseAssets
:processReleaseJavaRes NO-SOURCE
:transformResourcesWithMergeJavaResForRelease
:transformClassesAndResourcesWithProguardForRelease
ProGuard, version 5.3.2
Reading input...
Reading program jar [C:\Users\Matth\Desktop\Endless Jumper\Temp\gradleOut\libs\android-support-v4.jar] (filtered)
Reading program jar [C:\Users\Matth\Desktop\Endless Jumper\Temp\gradleOut\libs\bolts-android-1.2.0.jar] (filtered)
Reading program jar [C:\Users\Matth\Desktop\Endless Jumper\Temp\gradleOut\libs\com.android.support.support-annotations-25.2.0.jar] (filtered)
Reading program jar [C:\Users\Matth\Desktop\Endless Jumper\Temp\gradleOut\libs\unity-classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\ebe8ba175f79c888e2c720bb1eee4238141b22df\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\1bfd9bf8f2f5e3bfd1536eb5010c3501d19a8ab3\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\5d9a078ae1bbc29d8534b94e7cf3c2a135da9f4e\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\59609a6cffd07716bb9d17d37c8502ede98e3efb\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\aa22ee90f144915c6244b0cafefc3c1f7a465e4e\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\84b45a492153574abd446d52ccba8b2e02583534\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\08cb788b258ad9f5fddd741137865bdf9c9bbbc6\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\c9cdd0db0496a5a3ead166b2debf0d43925e76b6\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\537f6802d4764651fe083b707b5f5cddcc9dcd31\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\a2a61b0f14365a2cd4faca8c817e426dfb925d58\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\a6bd74aa3d99fd3f833cfd706227b39917c0bba1\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\2da564a1f8127c4a8453b14804a69452651863ef\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\f8dea0763daf2e3e9e069a5327b9e01e67a9285b\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\5a1c2132fc91aae94bb0e48689a444a44ec2a5e0\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\67c4f37350ec96f79f2edce6441fb90a604576bc\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\b7a6038dabeba52fe4286eec0bd777b4e2be3422\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\e3ad79add4c95fdc9c9154f28035401eb3e48b5f\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\0e3bc8c01c4e2d93609f311195d7d5a6c5305d98\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\f4366b4c4a4ed37d396e0fd2dfd6fb1e72c78911\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\b305aa5dedbc41ad7b0d4db3d368aab9b2b5997c\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\b2cec4d192f2d8807702e8c09161ef0caa3fa358\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\78e6809f633c79a060e1124bc29ffbe3a97ea559\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\1e0a4f4ee9c21baab7f317771a1e6c168f0dd3a7\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\b2f2e7a6a6c00e51077329353ba39d881c3e3c3a\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\13b1c589aea07700d64fba1e600045db543ea324\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\b93d3de98a9cfffc7509ee3d62af12fd855d0858\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\31fd0f8c2cc93f4f16765b4e2a86617e0adc3b47\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\a79a02af7468bcedeae48c542cf52be436c79362\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\.android\build-cache\fa50942623bc31b7f1867ab44f4c8a803ad78837\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\Desktop\Endless Jumper\Temp\gradleOut\Firebase\build\intermediates\bundles\default\classes.jar] (filtered)
Reading program jar [C:\Users\Matth\Desktop\Endless Jumper\Temp\gradleOut\build\intermediates\transforms\mergeJavaRes\release\jars\2\1f\main.jar] (filtered)
Reading program directory [C:\Users\Matth\Desktop\Endless Jumper\Temp\gradleOut\build\intermediates\classes\release] (filtered)
Reading library jar [C:\Users\Matth\AppData\Local\Android\Sdk\platforms\android-25\android.jar]
Reading library jar [C:\Users\Matth\AppData\Local\Android\Sdk\platforms\android-25\optional\org.apache.http.legacy.jar]
Note: duplicate definition of library class [org.apache.http.params.HttpConnectionParams]
Note: duplicate definition of library class [org.apache.http.params.HttpParams]
Note: duplicate definition of library class [org.apache.http.params.CoreConnectionPNames]
Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException]
Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory]
Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver]
Note: duplicate definition of library class [org.apache.http.conn.scheme.LayeredSocketFactory]
Note: duplicate definition of library class [android.net.http.HttpResponseCache]
Note: duplicate definition of library class [android.net.http.SslCertificate]
Note: duplicate definition of library class [android.net.http.SslCertificate$DName]
Note: duplicate definition of library class [android.net.http.SslError]
Initializing...
Note: the configuration refers to the unknown class 'com.google.android.gms.common.api.internal.BasePendingResult.ReleasableResultGuardian'
Note: the configuration refers to the unknown class 'com.google.android.gms.common.internal.safeparcel.SafeParcelable'
Note: the configuration refers to the unknown class 'com.google.android.gms.crash.internal.api.CrashApiImpl'
Note: com.google.android.gms.internal.zzcgn: can't find dynamically referenced class android.os.SystemProperties
Note: com.google.android.gms.internal.zzcjn: can't find dynamically referenced class com.google.android.gms.tagmanager.TagManagerService
Note: com.google.android.gms.internal.zzffl: can't find dynamically referenced class com.google.protobuf.ExtensionRegistry
Note: com.google.android.gms.internal.zzffm: can't find dynamically referenced class com.google.protobuf.Extension
Note: com.google.android.gms.internal.zzffp: can't find dynamically referenced class com.google.protobuf.ExtensionSchemaFull
Note: com.google.android.gms.internal.zzfgq: can't find dynamically referenced class com.google.protobuf.DescriptorMessageInfoFactory
Note: com.google.android.gms.internal.zzfhb: can't find dynamically referenced class com.google.protobuf.MapFieldSchemaFull
Note: com.google.android.gms.internal.zzfhx: can't find dynamically referenced class com.google.protobuf.GeneratedMessage
Note: com.google.android.gms.internal.zzfhx: can't find dynamically referenced class com.google.protobuf.UnknownFieldSetSchema
Note: com.google.android.gms.internal.zzfiq: can't find dynamically referenced class libcore.io.Memory
Note: com.google.android.gms.internal.zzfiq: can't find dynamically referenced class org.robolectric.Robolectric
Note: com.facebook.unity.UnityReflection accesses a field 'currentActivity' dynamically
Maybe this is program field 'com.unity3d.player.UnityPlayer { android.app.Activity currentActivity; }'
Note: com.google.android.gms.dynamite.DynamiteModule accesses a declared field 'MODULE_ID' dynamically
Maybe this is program field 'com.google.android.gms.dynamite.descriptors.com.google.android.gms.flags.ModuleDescriptor { java.lang.String MODULE_ID; }'
Note: com.google.android.gms.dynamite.DynamiteModule accesses a declared field 'MODULE_VERSION' dynamically
Maybe this is program field 'com.google.android.gms.dynamite.descriptors.com.google.android.gms.flags.ModuleDescriptor { int MODULE_VERSION; }'
Note: com.google.android.gms.dynamite.DynamiteModule accesses a declared field 'sClassLoader' dynamically
Maybe this is program field 'com.google.android.gms.dynamite.DynamiteModule$DynamiteLoaderClassLoader { java.lang.ClassLoader sClassLoader; }'
Note: com.google.android.gms.internal.zzdvl accesses a field 'SDK_INT' dynamically
Maybe this is library field 'android.os.Build$VERSION { int SDK_INT; }'
Note: the configuration refers to the unknown field 'com.go<message truncated>
I have rolled the Unity collab project back to when I did the last successful build but I had the same issue error. My build settings are as follows:
我已经将Unity collab项目回滚到上次成功构建时,但是我有同样的问题错误。我的构建设置如下:
Please let me know if there's any other information I can provide.
如果我能提供任何其他信息,请告诉我。
1 个解决方案
#1
0
From the following dependencies:
从以下附件:
compile 'com.google.firebase:firebase-core:9.0.2'
compile 'com.google.firebase:firebase-crash:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.2.1'
You see that you have different version of Firebase and Google Play Services. You need to make both using the same version. So, it should be like this:
您可以看到您有不同版本的Firebase和谷歌播放服务。您需要使用相同的版本。它应该是这样的:
// change to the version you need.
compile 'com.google.firebase:firebase-core:9.2.1'
compile 'com.google.firebase:firebase-crash:9.2.1'
compile 'com.google.android.gms:play-services-auth:9.2.1'
And you also need to check if react-native-google-signin
to make sure it is using the same version too. Don't use +
for version. The easiest way is excluding both Firebase and Google Play service from it:
您还需要检查是否使用了反应式本机-google-signin,以确保它也使用了相同的版本。不要使用+作为版本。最简单的方法是不包括Firebase和谷歌的Play服务:
compile(project(":react-native-google-signin")) {
exclude group: "com.google.android.gms"
exclude group: "com.google.firebase"
}
#1
0
From the following dependencies:
从以下附件:
compile 'com.google.firebase:firebase-core:9.0.2'
compile 'com.google.firebase:firebase-crash:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.2.1'
You see that you have different version of Firebase and Google Play Services. You need to make both using the same version. So, it should be like this:
您可以看到您有不同版本的Firebase和谷歌播放服务。您需要使用相同的版本。它应该是这样的:
// change to the version you need.
compile 'com.google.firebase:firebase-core:9.2.1'
compile 'com.google.firebase:firebase-crash:9.2.1'
compile 'com.google.android.gms:play-services-auth:9.2.1'
And you also need to check if react-native-google-signin
to make sure it is using the same version too. Don't use +
for version. The easiest way is excluding both Firebase and Google Play service from it:
您还需要检查是否使用了反应式本机-google-signin,以确保它也使用了相同的版本。不要使用+作为版本。最简单的方法是不包括Firebase和谷歌的Play服务:
compile(project(":react-native-google-signin")) {
exclude group: "com.google.android.gms"
exclude group: "com.google.firebase"
}