Ads not loading on React Native v0.19.0 for Android
I have this successfully working in iOS, but I can't figure out how to get it working for Android.
Could the readme be updated to include how/where to install the Google AdMob Framework for Android?
I followed the Android instructions on the readme, but I think I'm missing the Google AdMob Framework.
I'm a newbie with React Native Android, so I'm a little lost.
The reason why there are no instructions how to add the AdMob library on Android is that it's not needed. The gradle will do that automatically.
Can you give me more information? Are there any errors or is the banner simply not showing? Which rn version are you using?
On 28.01.2016, at 05:33, Dan Leveille [email protected] wrote:
I have this successfully working in iOS, but I can't figure out how to get it working for Android.
Could the readme be updated to include how/where to install the Google AdMob Framework for Android?
I followed the Android instructions on the readme, but I think I'm missing the Google AdMob Framework.
I'm a newbie with React Native Android, so I'm a little lost.
— Reply to this email directly or view it on GitHub.
@sbugert Oh, that's great to hear. Strangely enough, the interstitial works fine. The <RNBanner> component is rendering, it's just not displaying anything at all. I tried debugging by doing a console.log on onDidFailToReceiveAdWithError() and every other function of RNBanner, but none of the functions are called.
I'm on v0.19.0-rc of RN -- I'm guessing that might be the problem (I wanted to upgrade because I needed PickerAndroid).
I tried different react-native versions and it still works on v0.18.0, but stops working on v0.19.0 (released yesterday).
So I assume that something between the two versions broke it but I still have not figured out what exactly.
@sbugert Thanks for the update. Wish I could be more help, but unfortunately it's a bit over my head. :disappointed:
any update on this? switched to 0.19 and nothings working on (im on android too)
@jacob-russo we are actively working on this lib and will fix the issue soon(-ish). However, we are currently in the middle of another project. We'll keep you updated.
Could this be related to react-native/issues/5304 and react-native/issues/5655?
I see the package referenced in this error:
(...)
W/unknown:ViewManagerPropertyUpdater( 5084): Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager
W/unknown:ViewManagerPropertyUpdater( 5084): Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager
W/unknown:ViewManagerPropertyUpdater( 5084): Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewManager
W/unknown:ViewManagerPropertyUpdater( 5084): Could not find generated setter for class com.facebook.react.views.recyclerview.RecyclerViewBackedScrollViewManager
W/unknown:ViewManagerPropertyUpdater( 5084): Could not find generated setter for class com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager
W/unknown:ViewManagerPropertyUpdater( 5084): Could not find generated setter for class com.sbugert.rnadmob.RNAdMobBannerViewManager
Trying to figure out the issue here but I have little to no Java experience. Ads are the only thing holding up my Android launch, so I'm trying my best. Haha.
Looks like it could be related. However, the proposed fixes did not change anything for me. Have you also tried them? Maybe it's something else.
I haven't tried v0.20.0-rc yet, maybe there's a fix. I will try it tonight.
@sbugert Just tested v0.20.0-rc. Same thing -- interstitials work, but banners do not.
You need to update the imports to import com.facebook.react.uimanager.annotations.ReactProp; for the ReactProps to work on 0.19+
@cosmith Thank you so much, that is it! I couldn't import it first so I had to additionally update the gradle build file of the module (which still used rn 0.13).
@jacob-russo and @danleveille I will publish the working version later, good luck for your Android launch!
I love rubber duck debugging <3
it seems cause by progurad in v0.19 in the debug mode it works,but release it shows the log "Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager ;Could xxx ..."
Could be related to https://github.com/facebook/react-native/issues/5818. Can you try the suggested fix in this issue and tell me if it worked?