Open mxvsh opened 4 years ago
If you are using androidx than try going to node_modules/react-native-admob
, find the files from where you are getting the error and replace import android.support.annotation.Nullable;
with import androidx.annotation.Nullable;
I hope this helps.
If you are using androidx than try going to
node_modules/react-native-admob
, find the files from where you are getting the error and replaceimport android.support.annotation.Nullable;
withimport androidx.annotation.Nullable;
I hope this helps.
If you get Override error you may want to comment these lines on
@Override
public void onRewardedVideoCompleted() {
sendEvent(EVENT_VIDEO_COMPLETED, null);
}
on this file /node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobRewardedVideoAdModule.java
@Override public void onRewardsVideoCompleted () { sendEvent ( EVENT_VIDEO_COMPLETED , null ); }
in my case this method not added in class node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobRewardedVideoAdModule.java
/node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobRewarde dVideoAdModule.java:20: error: RNAdMobRewardedVideoAdModule is not abstract and does not override abstract method onRewardedVid eoCompleted() in RewardedVideoAdListener public class RNAdMobRewardedVideoAdModule extends ReactContextBaseJavaModule implements RewardedVideoAdListener { ^ 1 error
FAILURE: Build failed with an exception.
+1
the solution a preetty worse workaround. it should solve in the codebase.
not working those solution please share other...
I've tried changing these
I've installed the module using
npm i -S react-native-admob@next