Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNAdMobRewardedVideoAdModule is not abstract and does not override abstract method onRewardedVideoCompleted() in RewardedVideoAdListener #316

Closed
Buwaneka-Sumanasekara opened this issue May 30, 2018 · 32 comments

Comments

@Buwaneka-Sumanasekara
Copy link

Buwaneka-Sumanasekara commented May 30, 2018

../node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobRewardedVideoAdModule.java:25: error: RNAdMobRewardedVideoAdModule is not abstract and does not override abstract method onRewardedVideoCompleted() in RewardedVideoAdListener
public class RNAdMobRewardedVideoAdModule extends ReactContextBaseJavaModule implements RewardedVideoAdListener {
^

@ray-shawn
Copy link

+1

@koenpunt
Copy link
Collaborator

This has been fixed already in #273 . Are you using the latest version of this library?

@ray-shawn
Copy link

ray-shawn commented May 31, 2018

I am using 1.3.2 @koenpunt , actually we do not wanna update version due to certain reason, how to handle this issue.

Oh I see.
// @OverRide Deprecated
public void onRewardedVideoCompleted() {
sendEvent(EVENT_VIDEO_COMPLETED, null);
}

@wbrickner
Copy link

I'm encountering this issue, installing directly from npm, following the installation instructions exactly.
What can I do to fix this?

Here are my logs:
$ react-native run-android

> Task :react-native-admob:compileDebugJavaWithJavac FAILED
/home/will/Documents/ReactNative/VideoToolkit/New/GIFit/node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobRewardedVideoAdModule.java:20: error: RNAdMobRewardedVideoAdModule is not abstract and does not override abstract method onRewardedVideoCompleted() in RewardedVideoAdListener
public class RNAdMobRewardedVideoAdModule extends ReactContextBaseJavaModule implements RewardedVideoAdListener {
       ^
1 error


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-admob:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

I should mention:

Ubuntu 18.10
react-native-cli: 2.0.1
react-native: 0.57.8

Thank you for all the hard work you've done, I really appreciate it <3.

@raikk
Copy link

raikk commented Dec 28, 2018

@wbrickner same issue here! have you fixed it?? Anyone please help

@zxxza11
Copy link

zxxza11 commented Dec 29, 2018

same problem

3 similar comments
@Batuhan-Akkaya
Copy link

same problem

@amnan181
Copy link

same problem

@Anandks1993
Copy link

same problem

@SimonHudec
Copy link

+1

@sonicsmith
Copy link

I'm having the same issue.
RewardedVideoAdModule is not abstract and does not override abstract method onRewardedVideoCompleted() in RewardedVideoAdListener
react-native v0.58.4, react-native-admob v1.3.2

@jdgalani
Copy link

+1
exact same problem

@ghost
Copy link

ghost commented Feb 25, 2019

+1

1 similar comment
@breakerof
Copy link

+1

@kinjal111
Copy link

kinjal111 commented Mar 2, 2019

Hello , haivng the issue , please help me
RewardedVideoAdModule is not abstract and does not override abstract method onRewardedVideoCompleted() in RewardedVideoAdListener
react-native v0.58.6, react-native-admob v1.3.2

@breakerof
Copy link

hi guys,

if you install the latest version (v2.0.0-beta5) than the bug is gone.

@kinjal111
Copy link

kinjal111 commented Mar 2, 2019 via email

@ghost
Copy link

ghost commented Mar 2, 2019

I have tried v2.0.0-beta5
on react-native-cli: 2.0.1 / react-native: 0.58.6

But it makes "application has stopped"

@breakerof
Copy link

@kaiserleka have you looked at the emulator/device logs? maybe the application-id is wrong or missing?

@kinjal111
Copy link

@kaiserleka . i was also getting that same issue. but my issue is fixed after i added below statement in
android\app\build.gradle file
dependencies {
......
compile 'com.google.android.gms:play-services-ads:15.0.0'
implementation project(':react-native-admob')
...
}

@bosz
Copy link

bosz commented Mar 6, 2019

This has been fixed already in #273 . Are you using the latest version of this library?

Thanks man, this saved me hours,

@laptran-sym
Copy link

This has been fixed already in #273 . Are you using the latest version of this library?

Thanks man, this saved me hours,

That PR resolve this problem but it create new one => stop application

@Osamasomy
Copy link

I have tried v2.0.0-beta5
on react-native-cli: 2.0.1 / react-native: 0.58.6

But it makes "application has stopped"

implementation ('com.google.android.gms:play-services-ads:16.+') { force = true; }

put in android/app/build.gradle
its work for me i am using react-native 0.16.4

@iLevye
Copy link

iLevye commented Sep 6, 2019

Some versions (don't ask which one) of com.google.android.gms.ads.reward.RewardedVideoAdListener requires onRewardedVideoCompleted function. RNAdMobRewardedVideoAdModule class implements that class.

If you don't want to manage gms versions you can just create an empty function. I can't find any javascript call to that method anyway.

RNAdMobRewardedVideoAdModule.java

    @Override
    public void onRewardedVideoCompleted(){

    }

If your version of react-native-admob has onRewardedVideoCompleted function and you are getting 'method doesnt override' error, then remove the @OverRide annotation from method.

@Sanan4li
Copy link

@OverRide
public void onRewardedVideoCompleted(){

}

It Worked but Now the App is Crashed...

@amnan181
Copy link

amnan181 commented Jan 27, 2020

Hi @Sanan4li please add this ------=>

<meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>

into android AndroidManifest.xml
you can find AndroidManifest.xml from your_project_name/android/app/src/main

@amnan181
Copy link

For more information you can visit official link https://developers.google.com/admob/android/quick-start

@Sanan4li
Copy link

Sanan4li commented Jan 27, 2020

Hi @Sanan4li please add this ------=>

<meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>

into android AndroidManifest.xml
you can find AndroidManifest.xml from your_project_name/android/app/src/main

Thanks... it worked but having another issue... I think it will be fixed... Thanks a lot.

@amnan181
Copy link

can you send me AndroidManifest.xml code

@Sanan4li
Copy link

can you send me AndroidManifest.xml code

I updated the comment.. after reinstalling the app it worked..

@amnan181
Copy link

Hi @Sanan4li please add this ------=>

<meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>

into android AndroidManifest.xml
you can find AndroidManifest.xml from your_project_name/android/app/src/main

Thanks... it worked but having another issue... I think it will be fixed... Thanks a lot.

Great

1 similar comment
@amnan181
Copy link

Hi @Sanan4li please add this ------=>

<meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>

into android AndroidManifest.xml
you can find AndroidManifest.xml from your_project_name/android/app/src/main

Thanks... it worked but having another issue... I think it will be fixed... Thanks a lot.

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests