Admob withVungle Mediation conflict with Firebase Analytics

386 views
Skip to first unread message

julien.s...@gmail.com

unread,
Jul 3, 2018, 12:19:11 PM7/3/18
to Google Mobile Ads SDK Developers
Hello,

I'm not able to build an android project with Unity when I have Admob with Vungle Mediation and Firebase Analytics imported in the same project.
Even though, it's all working fine if i build with juste admob and vungle mediation or admob without vungle mediation and firebase analytics.

Unity version : 2017.4.6f1
Google Mobile Ads Unity Plugin v3.13.1
Google Mobile Ads Vungle Mediation v3.0.0
Firebase Analytics Unity SDK v5.1.1
jdk : 1.8.0_162
Android sdk tools: 26.1.1
Android sdk platform-Tools: 28.0.0
Android sdk build tools: 28.0.1
Android Support Repository 47.0.0

1) If I do a gradle export, the export work fine but when I try to build the gradle project I get this error:

Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in com.vungle.warren.Storage.migrate:(I)V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Message{kind=ERROR, text=Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in com.vungle.warren.Storage.migrate:(I)V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13), sources=[Unknown source file]}

2) If I try to build the apk directly from Unity I get this error:

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

stderr[
Dex: Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add 
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
    UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Exception parsing classes
at com.android.dx.command.dexer.Main.processClass(Main.java:781)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:747)
at com.android.dx.command.dexer.Main.access$1200(Main.java:88)
at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1689)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:695)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:592)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:321)
at com.android.dx.command.dexer.Main.run(Main.java:292)
at com.android.builder.internal.compiler.DexWrapper.run(DexWrapper.java:54)
at com.android.builder.core.DexByteCodeConverter.lambda$dexInProcess$0(DexByteCodeConverter.java:174)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:476)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.parseClass(Main.java:793)
at com.android.dx.command.dexer.Main.access$1600(Main.java:88)
at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1728)
at com.android.dx.command.dexer.Main.processClass(Main.java:779)
... 16 more

1 error; aborting

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForRelease'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex 'C:\Users\Severin\.android\build-cache\65e4a76a40a2f384bbd98d8e48470d76f908c3db\output\jars\classes.jar' to 'C:\Users\Severin\Documents\UnityProjects\AdMob_VungleMediation_Firebase_Error\Temp\gradleOut\build\intermediates\pre-dexed\release\classes_ba1f2e537c2c30029726a3952c65b51203c6fdd5.jar'

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

BUILD FAILED in 25s
]
stdout[
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
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
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:prepareAndroidArchCoreRuntime110Library
:prepareAndroidArchLifecycleLivedataCore110Library
:prepareAndroidArchLifecycleRuntime110Library
:prepareAndroidArchLifecycleViewmodel110Library
:prepareComAndroidSupportAnimatedVectorDrawable2711Library
:prepareComAndroidSupportAppcompatV72711Library
:prepareComAndroidSupportCustomtabs2711Library
:prepareComAndroidSupportSupportCompat2711Library
:prepareComAndroidSupportSupportCoreUi2711Library
:prepareComAndroidSupportSupportCoreUtils2711Library
:prepareComAndroidSupportSupportFragment2711Library
:prepareComAndroidSupportSupportMediaCompat2711Library
:prepareComAndroidSupportSupportV42711Library
:prepareComAndroidSupportSupportVectorDrawable2711Library
:prepareComEvernoteAndroidJob120Library
:prepareComGithubVungleVungleAndroidSdk634Library
:prepareComGoogleAdsMediationVungle6250Library
:prepareComGoogleAndroidGmsPlayServicesAds1501Library
:prepareComGoogleAndroidGmsPlayServicesAdsBase1501Library
:prepareComGoogleAndroidGmsPlayServicesAdsIdentifier1501Library
:prepareComGoogleAndroidGmsPlayServicesAdsLite1501Library
:prepareComGoogleAndroidGmsPlayServicesBase1501Library
:prepareComGoogleAndroidGmsPlayServicesBasement1501Library
:prepareComGoogleAndroidGmsPlayServicesGass1501Library
:prepareComGoogleAndroidGmsPlayServicesMeasurementBase1600Library
:prepareComGoogleAndroidGmsPlayServicesStats1501Library
:prepareComGoogleAndroidGmsPlayServicesTasks1501Library
:prepareComGoogleFirebaseFirebaseAnalytics1601Library
:prepareComGoogleFirebaseFirebaseAnalyticsImpl1611Library
:prepareComGoogleFirebaseFirebaseAnalyticsUnity511Library
:prepareComGoogleFirebaseFirebaseAppUnity511Library
:prepareComGoogleFirebaseFirebaseCommon1600Library
:prepareComGoogleFirebaseFirebaseCore1601Library
:prepareComGoogleFirebaseFirebaseIid1620Library
:prepareComGoogleFirebaseFirebaseIidInterop1600Library
:prepareComGoogleFirebaseFirebaseMeasurementConnector1700Library
:prepareComGoogleFirebaseFirebaseMeasurementConnectorImpl1601Library
:prepareComTonyodevFetchFetch115Library
:prepareNetVrallevAndroidCat105Library
: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:transformNativeLibsWithStripDebugSymbolForRelease
:Firebase:transformNativeLibsWithSyncJniLibsForRelease
:Firebase:bundleRelease
:GoogleMobileAdsPlugin:preBuild UP-TO-DATE
:GoogleMobileAdsPlugin:preReleaseBuild UP-TO-DATE
:GoogleMobileAdsPlugin:checkReleaseManifest
:GoogleMobileAdsPlugin:prepareReleaseDependencies
:GoogleMobileAdsPlugin:compileReleaseAidl
:GoogleMobileAdsPlugin:compileReleaseNdk NO-SOURCE
:GoogleMobileAdsPlugin:compileLint
:GoogleMobileAdsPlugin:copyReleaseLint NO-SOURCE
:GoogleMobileAdsPlugin:mergeReleaseShaders
:GoogleMobileAdsPlugin:compileReleaseShaders
:GoogleMobileAdsPlugin:generateReleaseAssets
:GoogleMobileAdsPlugin:mergeReleaseAssets
:GoogleMobileAdsPlugin:mergeReleaseProguardFiles
:GoogleMobileAdsPlugin:packageReleaseRenderscript NO-SOURCE
:GoogleMobileAdsPlugin:compileReleaseRenderscript
:GoogleMobileAdsPlugin:generateReleaseResValues
:GoogleMobileAdsPlugin:generateReleaseResources
:GoogleMobileAdsPlugin:packageReleaseResources
:GoogleMobileAdsPlugin:processReleaseManifest
:GoogleMobileAdsPlugin:generateReleaseBuildConfig
:GoogleMobileAdsPlugin:processReleaseResources
:GoogleMobileAdsPlugin:generateReleaseSources
:GoogleMobileAdsPlugin:incrementalReleaseJavaCompilationSafeguard
:GoogleMobileAdsPlugin:javaPreCompileRelease
:GoogleMobileAdsPlugin:compileReleaseJavaWithJavac
:GoogleMobileAdsPlugin:processReleaseJavaRes NO-SOURCE
:GoogleMobileAdsPlugin:transformResourcesWithMergeJavaResForRelease
:GoogleMobileAdsPlugin:transformClassesAndResourcesWithSyncLibJarsForRelease
:GoogleMobileAdsPlugin:mergeReleaseJniLibFolders
:GoogleMobileAdsPlugin:transformNativeLibsWithMergeJniLibsForRelease
:GoogleMobileAdsPlugin:transformNativeLibsWithStripDebugSymbolForRelease
:GoogleMobileAdsPlugin:transformNativeLibsWithSyncJniLibsForRelease
:GoogleMobileAdsPlugin:bundleRelease
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard
:javaPreCompileRelease
:compileReleaseJavaWithJavac
:compileReleaseNdk NO-SOURCE
:compileReleaseSources
:lintVitalRelease
:mergeReleaseShaders
:compileReleaseShaders
:generateReleaseAssets
:mergeReleaseAssets
:transformClassesWithDexForRelease FAILED
104 actionable tasks: 104 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 (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)

mobileadssdk-a...@google.com

unread,
Jul 3, 2018, 3:20:15 PM7/3/18
to julien.s...@gmail.com, Google Mobile Ads SDK Developers
Hi Julien,

Can you try with our sample apps and let us know? The logs are pointing out to a minimum SDK version min-sdk-version >= 26 via Vungle and I'm assuming that this is due to an implementation issue. Can you send us a sample app for us to debug as well? You can use "Reply Privately to Author" option to share the requested information privately.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/d52ff824-f88f-410b-bf91-e78b36e148b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

julien.s...@gmail.com

unread,
Jul 4, 2018, 9:00:33 AM7/4/18
to Google Mobile Ads SDK Developers
Hi,

So I tried with the hello world sample app but got the same errors.
if you want to reproduce the error you just have to do those four steps even on a new empty unity project:

1) import Google Mobile Ads Unity Plugin v3.13.1
2) import Firebase Analytics Unity SDK v5.1.1
3) import Google Mobile Ads Vungle Mediation v3.0.0
4) Build android apk (or export and build android gradle project)

Note than the build success if you do just 1) 2) and 4) or 1) 3) and 4). So it's really a conflict between Vungle mediation and Firebase.

Also, when doing 3) i got this warning:

Some conflicting dependencies were found.
The following dependency versions were modified:
com.google.firebase:firebase-common:16.0.0 --> com.google.firebase:firebase-common:+
com.google.android.gms:play-services-base:15.0.1 --> com.google.android.gms:play-services-base:+
com.google.firebase:firebase-core:16.0.0 --> com.google.firebase:firebase-core:+
com.github.vungle:vungle-android-sdk:6.2.5 --> com.github.vungle:vungle-android-sdk:+
com.google.firebase:firebase-analytics:16.0.0 --> com.google.firebase:firebase-analytics:+

UnityEngine.Debug:LogWarning(Object)
Google.Logger:Log(String, LogLevel)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel)
GooglePlayServices.<GradleResolution>c__AnonStorey0:<>m__0(Result)
GooglePlayServices.<GradleResolution>c__AnonStorey1:<>m__0()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

I hope all of this helps, I would really love to get firebase on our android games, but for the moment I will just skip it on android.

Thanks.

mobileadssdk-a...@google.com

unread,
Jul 5, 2018, 5:34:24 AM7/5/18
to julien.s...@gmail.com, Google Mobile Ads SDK Developers
Hi Julien,

Thank you for getting back to us with more details.

I was able to reproduce on my end the error logs you've encountered. That said, I will raise this to the rest of the team and we'll get back to you for any findings.

Regards,
Ivan Bautista
Mobile Ads SDK Team

julien.s...@gmail.com

unread,
Jul 5, 2018, 9:21:56 AM7/5/18
to Google Mobile Ads SDK Developers
Ok thanks for you support!

mobileadssdk-a...@google.com

unread,
Jul 10, 2018, 1:51:36 PM7/10/18
to julien.s...@gmail.com, Google Mobile Ads SDK Developers
Hi Julien,

I was able to successfully export and build a gradle project using this project which contains all 3 plugins. 

Can you check whether this works for you? It won't build using the standard internal build system as it hits the dex limit.

Regards

Sam



=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages