sbugert/react-native-admob

Interstitial AD Broken at AdMob Update SDK 20

Opened this issue · 33 comments

Not build npx react-native run-android .

image

Same issue.

same here

If you need to work around this problem, you can change the following row in the build.gradle file of the react-native-admob project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.

The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

If you need to work around this problem, you can change the following row in the build.gradle file of this project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.

The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

I confirm this did break react-native library this temporary fix solved it.Thanks!

If you need to work around this problem, you can change the following row in the build.gradle file of this project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.

The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

thanks

If you need to work around this problem, you can change the following row in the build.gradle file of this project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.

The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

Thank You so much

If you need to work around this problem, you can change the following row in the build.gradle file of this project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.

The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

This row wasn't included in my project. Although I added, nothing has changed

If you need to work around this problem, you can change the following row in the build.gradle file of this project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.
The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

This row wasn't included in my project. Although I added, nothing has changed

node_modules/react-native-admob/android/build.gradle

line 25

If you need to work around this problem, you can change the following row in the build.gradle file of this project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.
The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

This row wasn't included in my project. Although I added, nothing has changed

node_modules/react-native-admob/android/build.gradle

line 25

I was looking project's own build.gradle file. Thanks :)

Adsız
I think I wrote it in the wrong place. it turned into a mistake

  • What went wrong:
    A problem occurred evaluating root project 'merhaba8'.

Could not find method implementation() for arguments [com.google.android.gms:play-services-ads:+] on object of type org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.

Adsız
I think I wrote it in the wrong place. it turned into a mistake

  • What went wrong:
    A problem occurred evaluating root project 'merhaba8'.

Could not find method implementation() for arguments [com.google.android.gms:play-services-ads:+] on object of type org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.

You must delete these from root build.gradle file. Just change related field in this file: node_modules/react-native-admob/android/build.gradle

What's gonna be a permanent fix guys ?
Are maintainers going to update it or not ?
this is creating bit of issue changing it manually all time

If you need to do the workaround patch manually more than a couple of times, you might want to look into automating it with patch-package or creating your own fork.
See: https://github.com/ds300/patch-package

I would not expect a permanent fix, as the library does not seem to be actively maintained anymore.
Full migration to the v20 SDK seems to be a decent amount of work too.
See: https://developers.google.com/admob/android/migration
So if you do not want to take that route, you will probably need to look for alternative libraries.

It was working on my first try but it doesn't work anymore ("I applied my solution")
Adsız

If you need to work around this problem, you can change the following row in the build.gradle file of this project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.
The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

I confirm this did break react-native library this temporary fix solved it.Thanks!

It works for me with Rn version 0.63.4 but with version 0.64 my app does not open on my device, does anyone know why?

This is currently an issue i'm facing and have lost a lot of hours to it.

node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobInterstitialAdModule.java:20: error: cannot find symbol
import com.google.android.gms.ads.InterstitialAd;

  symbol:   class InterstitialAd
  location: package com.google.android.gms.ads

Android Manifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.xxxx">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:usesCleartextTraffic="true"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
        android:windowSoftInputMode="stateVisible|adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
      <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
          android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    </application>

</manifest>

build.gradle (app) dependencies

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    // implementation project(':react-native-navigation')
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation project(':react-native-splash-screen')

    implementation 'com.android.support:multidex:1.0.3'

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }
    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }
    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

build.gradle (project)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 23
        compileSdkVersion = 29
        targetSdkVersion = 29
        kotlinVersion = "1.3.72"
        RNNKotlinVersion = kotlinVersion
        supportLibVersion = "28.0.0"
    }
    repositories {
        google()
        mavenLocal()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
        classpath 'com.android.tools.build:gradle:3.5.4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        maven { url 'https://jitpack.io' }

    }
}

subprojects { subproject ->
    afterEvaluate {
        if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
            android {
                variantFilter { variant ->
                    def names = variant.flavors*.name
                    if (names.contains("reactNative51") ||
                            names.contains("reactNative55") ||
                            names.contains("reactNative56") ||
                            names.contains("reactNative57") ||
                            names.contains("reactNative57_5") ||
                            names.contains("reactNative60")
                    ) {
                        setIgnore(true)
                    }
                }
            }
        }
    }
}

I followed the instructions to add it to my project. It builds in iOS but won't build in Android. PLEASE HELP!

This is currently an issue i'm facing and have lost a lot of hours to it.

node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobInterstitialAdModule.java:20: error: cannot find symbol
import com.google.android.gms.ads.InterstitialAd;

  symbol:   class InterstitialAd
  location: package com.google.android.gms.ads

Android Manifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.xxxx">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:usesCleartextTraffic="true"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
        android:windowSoftInputMode="stateVisible|adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
      <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
          android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    </application>

</manifest>

build.gradle (app) dependencies

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    // implementation project(':react-native-navigation')
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation project(':react-native-splash-screen')

    implementation 'com.android.support:multidex:1.0.3'

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }
    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }
    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

build.gradle (project)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 23
        compileSdkVersion = 29
        targetSdkVersion = 29
        kotlinVersion = "1.3.72"
        RNNKotlinVersion = kotlinVersion
        supportLibVersion = "28.0.0"
    }
    repositories {
        google()
        mavenLocal()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
        classpath 'com.android.tools.build:gradle:3.5.4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        maven { url 'https://jitpack.io' }

    }
}

subprojects { subproject ->
    afterEvaluate {
        if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
            android {
                variantFilter { variant ->
                    def names = variant.flavors*.name
                    if (names.contains("reactNative51") ||
                            names.contains("reactNative55") ||
                            names.contains("reactNative56") ||
                            names.contains("reactNative57") ||
                            names.contains("reactNative57_5") ||
                            names.contains("reactNative60")
                    ) {
                        setIgnore(true)
                    }
                }
            }
        }
    }
}

I followed the instructions to add it to my project. It builds in iOS but won't build in Android. PLEASE HELP!

Update:

I updated my android studio gradle plugin classpath 'com.android.tools.build:gradle:4.1.0+' to match my distributionUrl version distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip , per android developer docs. Still failing.

Screen Shot 2021-05-04 at 2 08 06 PM

If you need to work around this problem, you can change the following row in the build.gradle file of this project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.
The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

This row wasn't included in my project. Although I added, nothing has changed

Same. Wasn't added, I added it, and nothing changed. (I did invalidate caches, restarted, cleaned and then built project)

If you need to work around this problem, you can change the following row in the build.gradle file of the react-native-admob project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.

The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

This did not work for me.

I needed to do some extra steps:

  1. Install the library
  2. Opennode_modules/react-native-admob/android/build.gradle
  3. Update the line 25 by adding implementation 'com.google.android.gms:play-services-ads:19.6.0'
  4. patch your changes: npx patch-package react-native-admob
  5. In your project folder, open android/app/build.gradle
  6. Add this to defaultConfig block:
defaultConfig {
    multiDexEnabled true
    ... //other configs
}

now you can run your app. Don't forget to use a test id in the asUnitID prop like this ca-app-pub-3940256099942544/6300978111 ✌️

3. implementation 'com.google.android.gms:play-services-ads:19.6.0'

Confirmed this solution worked for me without step 6.

I started to work on new package https://www.npmjs.com/package/@react-native-admob/admob because this package seems to not maintained any more. My package supports new SDK and also support interstitial and rewarded with react hook.

If you need to work around this problem, you can change the following row in the build.gradle file of the react-native-admob project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.

The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

It helps! Thank you so much!!!

Buenas por mas que probe con las posibles soluciones, no me funciono ninguma, alguien que logro solucionarlo porfa tengo estos errores

import com.google.android.gms.ads.InterstitialAd;
^
symbol: class InterstitialAd
location: package com.google.android.gms.ads
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobInterstitialAdModule.java:19: error: cannot find symbol
InterstitialAd mInterstitialAd;
^
symbol: class InterstitialAd
location: class com.sbugert.rnadmob.RNAdMobInterstitialAdModule
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:15: error: package com.google.android.gms.ads.reward does not exist
import com.google.android.gms.ads.reward.RewardedVideoAd;
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:16: error: package com.google.android.gms.ads.reward does not exist
import com.google.android.gms.ads.reward.RewardedVideoAdListener;
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:17: error: package com.google.android.gms.ads.reward does not exist
import com.google.android.gms.ads.reward.RewardItem;
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:20: error: cannot find symbol
public class RNAdMobRewardedVideoAdModule extends ReactContextBaseJavaModule implements RewardedVideoAdListener {
^
symbol: class RewardedVideoAdListener
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:21: error: cannot find symbol
RewardedVideoAd mRewardedVideoAd;
^
symbol: class RewardedVideoAd
location: class com.sbugert.rnadmob.RNAdMobRewardedVideoAdModule
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:37: error: cannot find symbol
public void onRewarded(RewardItem rewardItem) {
^
symbol: class RewardItem
location: class com.sbugert.rnadmob.RNAdMobRewardedVideoAdModule
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:16: error: package com.google.android.gms.ads.doubleclick does not exist
import com.google.android.gms.ads.doubleclick.AppEventListener;
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:17: error: package com.google.android.gms.ads.doubleclick does not exist
import com.google.android.gms.ads.doubleclick.PublisherAdRequest;
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:20: error: package com.google.android.gms.ads.doubleclick does not exist
import com.google.android.gms.ads.doubleclick.PublisherAdView;
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:24: error: cannot find symbol
public class RNPublisherBannerViewManager extends SimpleViewManager implements AppEventListener {
^
symbol: class AppEventListener
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:210: error: cannot find symbol
private void loadAd(final PublisherAdView adView) {
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobBannerViewManager.java:107: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobBannerViewManager.java:138: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobBannerViewManager.java:211: error: cannot find symbol
adRequestBuilder = adRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
^
symbol: method addTestDevice(java.lang.String)
location: variable adRequestBuilder of type com.google.android.gms.ads.AdRequest.Builder
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobBannerViewManager.java:213: error: cannot find symbol
adRequestBuilder = adRequestBuilder.addTestDevice(testDeviceID);
^
symbol: method addTestDevice(java.lang.String)
location: variable adRequestBuilder of type com.google.android.gms.ads.AdRequest.Builder
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobInterstitialAdModule.java:32: error: cannot find symbol
mInterstitialAd = new InterstitialAd(reactContext);
^
symbol: class InterstitialAd
location: class com.sbugert.rnadmob.RNAdMobInterstitialAdModule
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobInterstitialAdModule.java:43: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobInterstitialAdModule.java:65: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobInterstitialAdModule.java:108: error: cannot find symbol
adRequestBuilder = adRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
^
symbol: method addTestDevice(java.lang.String)
location: variable adRequestBuilder of type com.google.android.gms.ads.AdRequest.Builder
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobInterstitialAdModule.java:110: error: cannot find symbol
adRequestBuilder = adRequestBuilder.addTestDevice(testDeviceID);
^
symbol: method addTestDevice(java.lang.String)
location: variable adRequestBuilder of type com.google.android.gms.ads.AdRequest.Builder
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:36: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:46: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:52: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:57: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:62: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:67: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:72: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:116: error: cannot find symbol
RNAdMobRewardedVideoAdModule.this.mRewardedVideoAd = MobileAds.getRewardedVideoAdInstance(getCurrentActivity());
^
symbol: method getRewardedVideoAdInstance(android.app.Activity)
location: class com.google.android.gms.ads.MobileAds
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:129: error: cannot find symbol
adRequestBuilder = adRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
^
symbol: method addTestDevice(java.lang.String)
location: variable adRequestBuilder of type com.google.android.gms.ads.AdRequest.Builder
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNAdMobRewardedVideoAdModule.java:131: error: cannot find symbol
adRequestBuilder = adRequestBuilder.addTestDevice(testDeviceID);
^
symbol: method addTestDevice(java.lang.String)
location: variable adRequestBuilder of type com.google.android.gms.ads.AdRequest.Builder
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:65: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:85: error: cannot find symbol
final PublisherAdView adView = new PublisherAdView(mThemedReactContext);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:85: error: cannot find symbol
final PublisherAdView adView = new PublisherAdView(mThemedReactContext);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:88: error: cannot find symbol
PublisherAdView oldAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:88: error: cannot find symbol
PublisherAdView oldAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:97: error: cannot find symbol
final PublisherAdView adView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:97: error: cannot find symbol
final PublisherAdView adView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:110: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:114: error: cannot find symbol
case PublisherAdRequest.ERROR_CODE_INTERNAL_ERROR:
^
symbol: variable PublisherAdRequest
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:117: error: cannot find symbol
case PublisherAdRequest.ERROR_CODE_INVALID_REQUEST:
^
symbol: variable PublisherAdRequest
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:120: error: cannot find symbol
case PublisherAdRequest.ERROR_CODE_NETWORK_ERROR:
^
symbol: variable PublisherAdRequest
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:123: error: cannot find symbol
case PublisherAdRequest.ERROR_CODE_NO_FILL:
^
symbol: variable PublisherAdRequest
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:141: error: method does not override or implement a method from a supertype
@OverRide
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:165: error: cannot find symbol
PublisherAdView oldAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:165: error: cannot find symbol
PublisherAdView oldAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:169: error: cannot find symbol
PublisherAdView newAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:169: error: cannot find symbol
PublisherAdView newAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:195: error: cannot find symbol
PublisherAdView oldAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:195: error: cannot find symbol
PublisherAdView oldAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:199: error: cannot find symbol
PublisherAdView newAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:199: error: cannot find symbol
PublisherAdView newAdView = (PublisherAdView) view.getChildAt(0);
^
symbol: class PublisherAdView
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:212: error: package PublisherAdRequest does not exist
PublisherAdRequest.Builder adRequestBuilder = new PublisherAdRequest.Builder();
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:212: error: package PublisherAdRequest does not exist
PublisherAdRequest.Builder adRequestBuilder = new PublisherAdRequest.Builder();
^
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:215: error: cannot find symbol
adRequestBuilder = adRequestBuilder.addTestDevice(PublisherAdRequest.DEVICE_ID_EMULATOR);
^
symbol: variable PublisherAdRequest
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
D:\FERNAND\Mobile\Apss Con React\GeneradorADMOB\node_modules\react-native-admob\android\src\main\java\com\sbugert\rnadmob\RNPublisherBannerViewManager.java:220: error: cannot find symbol
PublisherAdRequest adRequest = adRequestBuilder.build();
^
symbol: class PublisherAdRequest
location: class com.sbugert.rnadmob.RNPublisherBannerViewManager
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
57 errors

Tengo la version del paquete a "react-native-admob": "^1.3.2" , ya que la ultima version que esta en beta igual me tira esos errores, porfa si alguien sabe de alguna otra solucion , gracias de antemano

I started to work on new package https://www.npmjs.com/package/@react-native-admob/admob because this package seems to not maintained any more. My package supports new SDK and also support interstitial and rewarded with react hook.

@fernandoVicentei I just switched to this package, maybe you should try it.

I started to work on new package https://www.npmjs.com/package/@react-native-admob/admob because this package seems to not maintained any more. My package supports new SDK and also support interstitial and rewarded with react hook.

@fernandoVicentei I just switched to this package, maybe you should try it.

Muchisimas gracias @Darkensses me a servido de muchooo me sirve a la totalidad ese paquete aunque me salen este error, supongo que es porque recien cree mi cuenta de google ads , porque con otra cuenta de un tutorial me funciona bien el anuncion, muchas gracias estimado

ERROR {"code": 3, "message": "Publisher data not found. https://support.google.com/admob/answer/9905175#9"}

That error is because maybe the admob account is not ready yet and it doesn't have ads right now.
I recommend you move this convo to the other package' repo (@react-native-admob/admob) or to an specific forum to avoid spamming this thread.

Ese error es porque a lo mejor la cuenta de admob aun no está lista y no tiene anuncios por ahora.
Te recomiendo mover esta conversación al otro repo del package (@react-native-admob/admob) o a un foro específico para evitar spamear este hilo

Saludos 👋

Ese error se debe a que tal vez la cuenta de admob aún no está lista y no tiene anuncios en este momento. Le recomiendo que mueva este convo al repositorio del otro paquete (@react-native-admob/admob) o a un foro específico para evitar enviar spam a este hilo.

Ese error es porque a lo mejor la cuenta de admob aun no está lista y no tiene anuncios por ahora. Te recomiendo mover esta conversación al otro repo del package (@react-native-admob/admob) o a un foro específico para evitar spamear este hilo

Saludos 👋

Gracias, pero como hago eso ? hahaha recien empiezo a preguntaar a travez de git hub

Any solution for latest SDK v20+???? using react-native-admob????

I started to work on new package https://www.npmjs.com/package/@react-native-admob/admob because this package seems to not maintained any more. My package supports new SDK and also support interstitial and rewarded with react hook.

@fernandoVicentei I just switched to this package, maybe you should try it.

This packege has many bugs and issues.

Any solution for latest SDK v20+???? using react-native-admob????

I started to work on new package https://www.npmjs.com/package/@react-native-admob/admob because this package seems to not maintained any more. My package supports new SDK and also support interstitial and rewarded with react hook.

@fernandoVicentei I just switched to this package, maybe you should try it.

This packege has many bugs and issues.

this package has not been updated since 2017, at least @react-native-admob / admob is working to provide updates and fixes.
You have the option to create your own package or use this one

If you need to work around this problem, you can change the following row in the build.gradle file of this project
implementation 'com.google.android.gms:play-services-ads:+'
to
implementation 'com.google.android.gms:play-services-ads:19.6.0'.
The changes the the SDK were made in version 19.7.0 and finalized in 20.0.0. This is not a long-term fix, though.

This row wasn't included in my project. Although I added, nothing has changed

node_modules/react-native-admob/android/build.gradle
line 25

I was looking project's own build.gradle file. Thanks :)

december 2021 and this still apply! saved my project.