react-native-appodeal
react-native-appodeal copied to clipboard
TypeError: Cannot read property 'initializeWithAppKey' of null
Hello, I followed the installation instructions and during the initialization I get an error:
TypeError: Cannot read property 'initializeWithAppKey' of null
Code that crashes me:
I have this error in just created expo project. I also tried to use 'npx expo prebuild'
I hope for help, thanks
Have this issue too. Looks like I can't initialize Appodeal from App component and show initialize it from Screen component inside App. Looks like it throws on the line com.appodeal.rnappodeal.RNAppodealModule.initializeWithAppKey (RNAppodealModule.java:63):
Appodeal.initialize(getCurrentActivity(),
appKey,
RNAppodealUtils.getAdTypesFormRNTypes(adTypes),
list -> sendEventToJS("onAppodealInitialized", null)
);
it can't retrieve activity (getCurrentActivity() returns null).
It's lack of the documentation or bug in the current version, which turns into Crash time by time in Google Play Console for my title.
Hi @Dem0n13 , have you fix this error ?