ammarahm-ed / react-native-admob-native-ads

A simple and robust library for creating & displaying Admob Native Advanced Ads in your React Native App using Native Views.
https://ammarahm-ed.github.io/react-native-admob-native-ads/docs/introduction/
MIT License
407 stars 138 forks source link

Android does not compile #322

Closed davidarnaub7 closed 1 year ago

davidarnaub7 commented 1 year ago

..node_modules/react-native-admob-native-ads/android/src/main/java/com/ammarahmed/rnadmob/nativeads/Utils.java:11: error: cannot find symbol import com.google.ads.mediation.facebook.FacebookAdapter; ^ symbol: class FacebookAdapter location: package com.google.ads.mediation.facebook

The app compiles correctly for IOS. But in Android this message appears.

Any idea?

jesustorrijogimeno commented 1 year ago

I have the same error since I udpdated to RN 0.71.0. In 0.70.4 it worked.

haresh4d commented 1 year ago

Run following command in your project directory:

sed -i.backup 's/com.google.ads.mediation:facebook:6.+/com.google.ads.mediation:facebook:6.11.0.0+/g' node_modules/react-native-admob-native-ads/android/build.gradle

cbridges1 commented 1 year ago

Please see the comment in this pull request to see if it resolves your issue.

vaibhavgadekar commented 1 year ago

sed -i.backup 's/com.google.ads.mediation:facebook:6.+/com.google.ads.mediation:facebook:6.11.0.0+/g' node_modules/react-native-admob-native-ads/android/build.gradle

Working fine with this solution, Thanks @haresh4d

ammarahm-ed commented 1 year ago

This has been fixed in v0.6.3. Please update.