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

Ads not loading on React Native v0.19.0 for Android #3

Closed
danleveille opened this issue Jan 28, 2016 · 14 comments
Closed

Ads not loading on React Native v0.19.0 for Android #3

danleveille opened this issue Jan 28, 2016 · 14 comments

Comments

@danleveille
Copy link

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.

@sbugert
Copy link
Owner

sbugert commented Jan 28, 2016

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.

@danleveille
Copy link
Author

@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).

@sbugert
Copy link
Owner

sbugert commented Jan 31, 2016

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.

@danleveille danleveille changed the title Add better Android instructions to readme Ads not loading on React Native v0.19.0 Feb 1, 2016
@danleveille danleveille changed the title Ads not loading on React Native v0.19.0 Ads not loading on React Native v0.19.0 for Android Feb 1, 2016
@danleveille
Copy link
Author

@sbugert Thanks for the update. Wish I could be more help, but unfortunately it's a bit over my head. 😞

@jacob-russo
Copy link

any update on this? switched to 0.19 and nothings working on (im on android too)

@dkolba
Copy link
Contributor

dkolba commented Feb 2, 2016

@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.

@danleveille
Copy link
Author

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.

@sbugert
Copy link
Owner

sbugert commented Feb 6, 2016

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.

@danleveille
Copy link
Author

@sbugert Just tested v0.20.0-rc. Same thing -- interstitials work, but banners do not.

@cosmith
Copy link

cosmith commented Feb 9, 2016

You need to update the imports to import com.facebook.react.uimanager.annotations.ReactProp; for the ReactProps to work on 0.19+

@sbugert
Copy link
Owner

sbugert commented Feb 9, 2016

@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!

@sbugert sbugert closed this as completed in 56bd520 Feb 9, 2016
@dkolba
Copy link
Contributor

dkolba commented Feb 9, 2016

I love rubber duck debugging <3

@yipengmu
Copy link

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 ..."

@sbugert
Copy link
Owner

sbugert commented Feb 17, 2016

Could be related to facebook/react-native#5818.
Can you try the suggested fix in this issue and tell me if it worked?

cogell referenced this issue in patch-engineering/react-native-admob May 18, 2020
DFPInterstitial support custom targeting
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

6 participants