GoogleMobileAdsMediationTestSuite errors

531 views
Skip to first unread message

tejo

unread,
Oct 26, 2021, 5:53:13 AM10/26/21
to Google Mobile Ads SDK Developers
Hi,

The GoogleMobileAds package is v6.1.2, the FacebookUnityAdapter is v3.3.0.
The build is mark as development.

When I first import the GoogleMobileAdsMediationTestSuite I got this error:

Assets\GoogleMobileAdsMediationTestSuite\Platforms\Android\MediationTestClient.cs(146,53):
error CS1061: 'AdRequest' does not contain a definition for 'TestDevices' and no accessible
extension method 'TestDevices' accepting a first argument of type 'AdRequest'
could be found (are you missing a using directive or an assembly reference?)


if I comment those lines out and try to build I got:


Note: googleads-mobile-unity\samples\HelloWorld\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
googleads-mobile-unity\samples\HelloWorld\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\debug\out\1_androidx.arch.core.core-common-2.0.1.jar: D8: Type androidx.arch.core.internal.SafeIterableMap$Entry is defined multiple times: googleads-mobile-unity\samples\HelloWorld\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\debug\out\1_androidx.arch.core.core-common-2.0.1.jar:classes.dex, googleads-mobile-unity\samples\HelloWorld\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\debug\out\1_androidx.arch.core.core-common-2.1.0.jar:classes.dex
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Type androidx.arch.core.internal.SafeIterableMap$Entry is defined multiple times: googleads-mobile-unity\samples\HelloWorld\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\debug\out\1_androidx.arch.core.core-common-2.0.1.jar:classes.dex, googleads-mobile-unity\samples\HelloWorld\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\debug\out\1_androidx.arch.core.core-common-2.1.0.jar:classes.dex
    at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:119)
    at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102)
    at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:445)
    at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:348)
    at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:50)
    at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:47)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1$1.create(NoIsolationWorkerFactory.java:65)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1$1.create(NoIsolationWorkerFactory.java:61)
    at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:98)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.execute(NoIsolationWorkerFactory.java:61)
    at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
    at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
    at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:56)
    at org.gradle.workers.internal.DefaultWorkerExecutor$3.call(DefaultWorkerExecutor.java:215)
    at org.gradle.workers.internal.DefaultWorkerExecutor$3.call(DefaultWorkerExecutor.java:210)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
    at com.android.tools.r8.utils.O.a(:65)
    at com.android.tools.r8.D8.run(:11)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117)
    ... 34 more
Caused by: com.android.tools.r8.utils.b: Error: googleads-mobile-unity\samples\HelloWorld\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\debug\out\1_androidx.arch.core.core-common-2.0.1.jar:classes.dex, Type androidx.arch.core.internal.SafeIterableMap$Entry is defined multiple times: googleads-mobile-unity\samples\HelloWorld\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\debug\out\1_androidx.arch.core.core-common-2.0.1.jar:classes.dex, googleads-mobile-unity\samples\HelloWorld\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\debug\out\1_androidx.arch.core.core-common-2.1.0.jar:classes.dex
    at com.android.tools.r8.utils.y0.a(:21)
    at com.android.tools.r8.utils.x0.a(:30)
    at com.android.tools.r8.utils.x0.a(:10)
    at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990)
    at com.android.tools.r8.utils.x0.a(:6)
    at com.android.tools.r8.graph.A0$c.a(:6)
    at com.android.tools.r8.dex.a.a(:85)
    at com.android.tools.r8.dex.a.a(:12)
    at com.android.tools.r8.D8.d(:6)
    at com.android.tools.r8.D8.b(:1)
    at com.android.tools.r8.utils.O.a(:30)
    ... 36 more


FAILURE: Build failed with an exception.


I am on windows.

Any Clues?

Thanks


Mobile Ads SDK Forum Advisor

unread,
Oct 26, 2021, 12:36:52 PM10/26/21
to m.p...@gmail.com, google-adm...@googlegroups.com
Hi tejo,

Thank you for bringing this issue to our attention. We would start by asking if you can share with us via the "Reply to author button" with a zipped file of a sample app with your implementation. As well as steps to replicate this issue. Also what versions of Unity and the plugins you are using.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2QFFXd:ref

tejo

unread,
Oct 29, 2021, 6:13:33 AM10/29/21
to Google Mobile Ads SDK Developers
Hi William, any news? I post here the instructions just for reference:

https://www.dropbox.com/s/cxmnraowawwrq9u/HelloWorld.zip?dl=1
  1.  import the project in unity 2021.1.14f1
  2. open the project
  3. switch build platform to android
  4. force android dependency resolver if needed
  5. at this point you should already see the following error: Assets\GoogleMobileAdsMediationTestSuite\Platforms\Android\MediationTestClient.cs(148,53): error CS1061: 'AdRequest' does not contain a definition for 'TestDevices' and no accessible extension method 'TestDevices' accepting a first argument of type 'AdRequest' could be found (are you missing a using directive or an assembly reference?)
  6. comment lines from 148 to 151 in Assets\GoogleMobileAdsMediationTestSuite\Platforms\Android\MediationTestClient.cs
  7. try to make an android build and you should see the error reported in the previous message :"Note: \HelloWorld\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.....[TRUNCATED]"
thanks

Mobile Ads SDK Forum Advisor

unread,
Oct 29, 2021, 2:14:16 PM10/29/21
to m.p...@gmail.com, google-adm...@googlegroups.com
Hi Tejo,

Thank you for the response. I was able to find this article that talks about a workaround to get this error to disappear. When following this it seems to not give us this error. If you can check using this also.

tejo

unread,
Oct 31, 2021, 3:56:31 AM10/31/21
to Google Mobile Ads SDK Developers
Hi William,

Thank for your response. Am I missing something or the error you are talking about it's not the error I get?

Haider Rathore

unread,
Nov 1, 2021, 4:00:50 AM11/1/21
to Google Mobile Ads SDK Developers
Hi, This article you mentioned is no way near actual issue we are facing with Mediation Test Suit. Latest Admob is not compatible with TestSuit as it throws error. UPDATE IT PLEASE.
1.PNG2.PNG

Mobile Ads SDK Forum Advisor

unread,
Nov 2, 2021, 3:23:50 AM11/2/21
to haiderr...@gmail.com, google-adm...@googlegroups.com

Hello Haider,

Thank you for your response.

I'm a colleague of William and will be assisting you on this. It seems that this error occurs in the unity mediation test suite for android as it is using the version 1.5.0. While the android platform is now using the new version 2.0.0. There is an existing request with regards to the update of the unity mediation test suite version. For the meantime, you can check this possible solution as of the moment. You may keep an eye on our blog or release.

As a side note, if you're having trouble receiving private replies from us, please check your Spam folder. Additionally, please add the 'From address' on that email to your contact list to ensure we aren't flagged as Spam in future messages. If you don't see a message from us in your Spam folder, please email us directly at mobileads-...@google.com referring to this forum thread.

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 

 

ref:_00D1U1174p._5004Q2QFFXd:ref
Reply all
Reply to author
Forward
0 new messages