skip to Main Content

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


  1. try to change mavencenter() to jcenter() after mediation suits test work juste return to mavencenter()

    Login or Signup to reply.
  2. Same problems with me this day, spend hours to remove that same errors.
    I try this and its solved..!

    1. Remove jcenter() from gradle project’s from both allprojects and
      buildscript, sync gradle.
    2. Add again jcenter() in same places as removed before, sync again
    3. Errors Gone !
    Login or Signup to reply.
  3. 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:

    <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="YOUR_ADMOB_PUB_ID"/>
    

    2…If you have previously removed jcenter() [because its deprecated] from build.gradle(Project) put it back into repositories.

    repositories {
      jcenter()
      mavenCentral()
      google()
    }
    

    3…Make sure android.useAndroidX=true & android.enableJetifier=true is in your gradle.properties.

    android.useAndroidX=true
    android.enableJetifier=true
    

    4…Add the implementation to the build.gradle(Module)

    implementation 'com.google.android.ads:mediation-test-suite:2.0.0'
    

    5…Change your debug options in build.gradle(Module) to prevent crashes. Add debuggable true & make sure minify and shrink are false.

    debug {
            debuggable true
            minifyEnabled false
            shrinkResources 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…..

    Activty tActivity = this;
        MobileAds.initialize(tActivity, new OnInitializationCompleteListener() {
            @Override
            public void onInitializationComplete(InitializationStatus initializationStatus) {
                Map<String, AdapterStatus> statusMap = initializationStatus.getAdapterStatusMap();
                for (String adapterClass : statusMap.keySet()) {
                    AdapterStatus status = statusMap.get(adapterClass);
                     Log.d("Mediation", String.format(
                             "Adapter name: %s, Description: %s, Latency: %d",
                             adapterClass, status.getDescription(), status.getLatency()));
                }
                loadGoogleBanner();
                loadFullScreen();
                tActivity.runOnUiThread(new Runnable() {
                    public void run() {
                        MediationTestSuite.launch(tActivity);
                    }
                });
            }
        });
    

    7…Resync. Clean & rebuild. Invalidate cache if necessary. Importantly! Do NOT import the flexbox?.?.? into implementations. jcenter() already knows where to find it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search