Admob加入了团结

时间:2018-12-10 15:32:47

标签: android unity3d

有什么办法解决这个问题?我正在尝试用统一的Firebase和admobs构建统一游戏。

这只有在我将Admobs添加到内部版本之后才发生。它似乎与Firebase或其他相同方式的插件发生冲突。

它在游戏中工作正常,但是每次我构建它时,都会崩溃。删除gradle是个麻烦,因为它一开始会使我的apk崩溃。

CommandInvokationFailure: Gradle build failed. 
C:\Program Files\Java\jdk1.8.0_181\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/customtabs/CustomTabsSession.class

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 12s
]
stdout[
:preBuild UP-TO-DATE
:Firebase:preBuild UP-TO-DATE
:Firebase:preReleaseBuild UP-TO-DATE
:Firebase:checkReleaseManifest
:Firebase:processReleaseManifest
:GoogleMobileAdsPlugin:preBuild UP-TO-DATE
:GoogleMobileAdsPlugin:preReleaseBuild UP-TO-DATE
:GoogleMobileAdsPlugin:checkReleaseManifest
:GoogleMobileAdsPlugin:processReleaseManifest
:unity-android-resources:preBuild UP-TO-DATE
:unity-android-resources:preReleaseBuild UP-TO-DATE
:unity-android-resources:checkReleaseManifest
:unity-android-resources:processReleaseManifest
:preReleaseBuild
:Firebase:compileReleaseAidl
:GoogleMobileAdsPlugin:compileReleaseAidl
:unity-android-resources:compileReleaseAidl
:compileReleaseAidl
:Firebase:packageReleaseRenderscript NO-SOURCE
:GoogleMobileAdsPlugin:packageReleaseRenderscript NO-SOURCE
:unity-android-resources:packageReleaseRenderscript NO-SOURCE
:compileReleaseRenderscript
:checkReleaseManifest
:generateReleaseBuildConfig
:prepareLintJar
:generateReleaseResValues
:generateReleaseResources
:Firebase:compileReleaseRenderscript
:Firebase:generateReleaseResValues
:Firebase:generateReleaseResources
:Firebase:packageReleaseResources
:GoogleMobileAdsPlugin:compileReleaseRenderscript
:GoogleMobileAdsPlugin:generateReleaseResValues
:GoogleMobileAdsPlugin:generateReleaseResources
:GoogleMobileAdsPlugin:packageReleaseResources
:unity-android-resources:compileReleaseRenderscript
:unity-android-resources:generateReleaseResValues
:unity-android-resources:generateReleaseResources
:unity-android-resources:packageReleaseResources
:mergeReleaseResources
:createReleaseCompatibleScreenManifests
:processReleaseManifest
C:\Users\PC\Documents\war-of-origin\Temp\gradleOut\src\main\AndroidManifest.xml:24:9-31:50 Warning:
    activity#com.google.firebase.auth.internal.FederatedSignInActivity@android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present
:splitsDiscoveryTaskRelease
:Firebase:platformAttrExtractor
:GoogleMobileAdsPlugin:platformAttrExtractor
:unity-android-resources:platformAttrExtractor
:Firebase:generateReleaseBuildConfig
:Firebase:prepareLintJar
:Firebase:javaPreCompileRelease
:Firebase:processReleaseJavaRes NO-SOURCE
:GoogleMobileAdsPlugin:generateReleaseBuildConfig
:GoogleMobileAdsPlugin:prepareLintJar
:GoogleMobileAdsPlugin:javaPreCompileRelease
:GoogleMobileAdsPlugin:processReleaseJavaRes NO-SOURCE
:unity-android-resources:generateReleaseBuildConfig
:unity-android-resources:prepareLintJar
:unity-android-resources:javaPreCompileRelease
:unity-android-resources:processReleaseJavaRes NO-SOURCE
:compileReleaseNdk NO-SOURCE
:mergeReleaseShaders
:compileReleaseShaders
:generateReleaseAssets
:Firebase:mergeReleaseShaders
:Firebase:compileReleaseShaders
:Firebase:generateReleaseAssets
:Firebase:mergeReleaseAssets
:GoogleMobileAdsPlugin:mergeReleaseShaders
:GoogleMobileAdsPlugin:compileReleaseShaders
:GoogleMobileAdsPlugin:generateReleaseAssets
:GoogleMobileAdsPlugin:mergeReleaseAssets
:unity-android-resources:mergeReleaseShaders
:unity-android-resources:compileReleaseShaders
:GoogleMobileAdsPlugin:processReleaseResources
:GoogleMobileAdsPlugin:generateReleaseSources
:GoogleMobileAdsPlugin:compileReleaseJavaWithJavac
:GoogleMobileAdsPlugin:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:unity-android-resources:generateReleaseAssets
:unity-android-resources:mergeReleaseAssets
:mergeReleaseAssets
:mergeReleaseJniLibFolders
:Firebase:compileReleaseNdk NO-SOURCE
:Firebase:mergeReleaseJniLibFolders
:Firebase:transformNativeLibsWithMergeJniLibsForRelease
:Firebase:transformNativeLibsWithIntermediateJniLibsForRelease
:GoogleMobileAdsPlugin:compileReleaseNdk NO-SOURCE
:GoogleMobileAdsPlugin:mergeReleaseJniLibFolders
:GoogleMobileAdsPlugin:transformNativeLibsWithMergeJniLibsForRelease
:GoogleMobileAdsPlugin:transformNativeLibsWithIntermediateJniLibsForRelease
:unity-android-resources:compileReleaseNdk NO-SOURCE
:unity-android-resources:mergeReleaseJniLibFolders
:unity-android-resources:transformNativeLibsWithMergeJniLibsForRelease
:unity-android-resources:transformNativeLibsWithIntermediateJniLibsForRelease
:processReleaseJavaRes NO-SOURCE
:validateSigningRelease
:Firebase:mergeReleaseConsumerProguardFiles
:Firebase:transformNativeLibsWithSyncJniLibsForRelease
:Firebase:mergeReleaseResources
:Firebase:verifyReleaseResources
:GoogleMobileAdsPlugin:extractReleaseAnnotations
:GoogleMobileAdsPlugin:mergeReleaseConsumerProguardFiles
:GoogleMobileAdsPlugin:transformResourcesWithMergeJavaResForRelease
:GoogleMobileAdsPlugin:transformClassesAndResourcesWithSyncLibJarsForRelease
:GoogleMobileAdsPlugin:transformNativeLibsWithSyncJniLibsForRelease
:GoogleMobileAdsPlugin:bundleRelease
:GoogleMobileAdsPlugin:compileReleaseSources
:GoogleMobileAdsPlugin:mergeReleaseResources
:GoogleMobileAdsPlugin:verifyReleaseResources
:GoogleMobileAdsPlugin:assembleRelease
:unity-android-resources:mergeReleaseConsumerProguardFiles
:unity-android-resources:transformNativeLibsWithSyncJniLibsForRelease
:unity-android-resources:mergeReleaseResources
:unity-android-resources:verifyReleaseResources
:Firebase:processReleaseResources
:Firebase:generateReleaseSources
:Firebase:compileReleaseJavaWithJavac
:Firebase:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:Firebase:extractReleaseAnnotations
:Firebase:transformResourcesWithMergeJavaResForRelease
:Firebase:transformClassesAndResourcesWithSyncLibJarsForRelease
:Firebase:bundleRelease
:Firebase:compileReleaseSources
:Firebase:assembleRelease
:unity-android-resources:processReleaseResources
:processReleaseResources
:generateReleaseSources
:unity-android-resources:generateReleaseSources
:unity-android-resources:compileReleaseJavaWithJavac
:unity-android-resources:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:javaPreCompileRelease
:compileReleaseJavaWithJavac
:compileReleaseSources
:lintVitalRelease
:transformClassesWithJarMergingForRelease FAILED
98 actionable tasks: 98 executed
]
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 (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, 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)

0 个答案:

没有答案