I am trying to test my integration for Facebook Audience Network bidding with Google Admob by using the mediation testing. I followed the steps provided by the Google Admob to setup the Mediation Test Suite, but I ended up getting the following error when Android studio trying to build the app:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.google.android:flexbox:1.1.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/android/flexbox/1.1.1/flexbox-1.1.1.pom
- https://repo.maven.apache.org/maven2/com/google/android/flexbox/1.1.1/flexbox-1.1.1.pom
Required by:
project :app > com.google.android.ads:mediation-test-suite:2.0.0
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
I am really not sure what I am missing. I already add the implementation for the Mediation Suite properly in my manifest file, and also I added my App ID from Google Admob to manifest file too, and set up the testing device. But still get this error. Can anyone help me with this error? Thank you for your help!
3
Answers
try to change
mavencenter()
tojcenter()
after mediation suits test work juste return tomavencenter()
Same problems with me this day, spend hours to remove that same errors.
I try this and its solved..!
buildscript, sync gradle.
Just adding some extra details for people trying to use the Mediation Test Suite from admob. (Especially if your getting the flexbox1.1.1 error issue)
Finer details always help. Here are all the steps needed to make it work::
1…Add your publisher ID from admob to your manifest:
2…If you have previously removed jcenter() [because its deprecated] from build.gradle(Project) put it back into repositories.
3…Make sure android.useAndroidX=true & android.enableJetifier=true is in your gradle.properties.
4…Add the implementation to the build.gradle(Module)
5…Change your debug options in build.gradle(Module) to prevent crashes. Add debuggable true & make sure minify and shrink are false.
6…The code for Mediation Test Suite should be added after your ad system has initialized. Make sure the MobileAds.initialize(…) has completed eg…..
7…Resync. Clean & rebuild. Invalidate cache if necessary. Importantly! Do NOT import the flexbox?.?.? into implementations. jcenter() already knows where to find it.