invertase / react-native-google-mobile-ads

React Native Google Mobile Ads enables you to monetize your app with AdMob.
https://docs.page/invertase/react-native-google-mobile-ads
Other
651 stars 131 forks source link

[🐛] "RNGoogleMobileAdsBannerView" was not found in the UIManager #453

Closed SalmanFaris53 closed 11 months ago

SalmanFaris53 commented 11 months ago

What happened?

As per the documentation i have done everything in my project and my project is in expo And now when i am running the project iam getting this error:- "requireNativeComponent: "RNGoogleMobileAdsBannerView" was not found in the UIManager"

used library version:- "react-native-google-mobile-ads": "10.0.0",

Platforms

Android, but have not tested behavior on iOS

React Native Info

System:
    OS: macOS 13.5.2
    CPU: (8) arm64 Apple M1
    Memory: 92.59 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    Yarn: 1.22.19 - ~/Fariz/Tanbish/node_modules/.bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
    Watchman: 2023.02.06.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.12.1 - /Users/tomsherrobinson/.rvm/gems/ruby-2.7.6/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.3 AI-223.8836.35.2231.10671973
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.18 - /usr/bin/javac

Are your using Typescript?

package.json

{
  "name": "tanbish",
  "version": "1.4.4",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/config-plugins": "^6.0.0",
    "@expo/prebuild-config": "~6.0.0",
    "@expo/vector-icons": "^13.0.0",
    "@openspacelabs/react-native-zoomable-view": "^2.0.4",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/datetimepicker": "6.7.3",
    "@react-native-community/netinfo": "9.3.7",
    "@react-native-community/slider": "4.4.2",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/drawer": "^6.5.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.0",
    "@react-navigation/stack": "^6.3.2",
    "@stripe/stripe-react-native": "0.23.3",
    "apisauce": "^2.1.6",
    "expo": "~48.0.18",
    "expo-app-loading": "~2.1.0",
    "expo-apple-authentication": "~6.0.1",
    "expo-build-properties": "~0.6.0",
    "expo-constants": "~14.2.1",
    "expo-dev-client": "~2.2.1",
    "expo-firebase-recaptcha": "^2.3.0",
    "expo-font": "~11.1.1",
    "expo-image-picker": "~14.1.1",
    "expo-linear-gradient": "~12.1.2",
    "expo-linking": "~4.0.1",
    "expo-localization": "~14.1.1",
    "expo-location": "~15.1.1",
    "expo-notifications": "~0.18.1",
    "expo-screen-orientation": "~5.1.1",
    "expo-secure-store": "~12.1.1",
    "expo-splash-screen": "~0.18.2",
    "expo-status-bar": "^1.4.0",
    "firebase": "9.9.2",
    "formik": "^2.2.9",
    "html-entities": "^2.3.3",
    "lodash": "^4.17.21",
    "lottie-react-native": "5.1.4",
    "lru-cache": "^7.17.0",
    "mime": "^3.0.0",
    "moment": "^2.29.4",
    "qs": "^6.11.0",
    "react": "18.2.0",
    "react-native": "0.71.8",
    "react-native-draggable-flatlist": "^3.1.2",
    "react-native-geocoding": "^0.5.0",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-google-mobile-ads": "10.0.0",
    "react-native-maps": "1.3.2",
    "react-native-phone-number-input": "^2.1.0",
    "react-native-progress": "^5.0.0",
    "react-native-razorpay": "^2.3.0",
    "react-native-read-more-text": "^1.1.2",
    "react-native-reanimated": "~2.14.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-svg": "13.4.0",
    "react-native-webview": "11.26.0",
    "react-native-youtube-iframe": "^2.2.2",
    "yarn": "^1.22.19",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

app.json

{
  "expo": {
    "name": "Tanbish",
    "slug": "tanbish",
    "version": "1.4.4",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "plugins": [
      [
        "expo-notifications",
        {
          "icon": "./assets/icon96x96.png",
          "color": "#ffffff",
          "mode": "production"
        }
      ],
      "./plugins/react-native-maps-plugin",
      "./plugins/with-no-bitcode",
      [
        "expo-build-properties",
        {
          "ios": {
            "deploymentTarget": "13.0",
            "useFrameworks": "static"
          }
        }
      ],
      "expo-localization"
    ],
    "splash": {
      "image": "./assets/splash.png",
      "backgroundColor": "#ffffff",
      "resizeMode": "cover"
    },
    "notification": {
      "icon": "./assets/icon96x96.png",
      "color": "#ffffff",
      "iosDisplayInForeground": true,
      "androidMode": "default"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "bitcode": "Debug",
      "usesAppleSignIn": true,
      "supportsTablet": true,
      "bundleIdentifier": "com.tanbish",
      "buildNumber": "14",
      "infoPlist": {
        "NSCameraUsageDescription": "Tanbish uses the camera to capture and upload user profile image and Listing Image to the server.",
        "NSPhotoLibraryUsageDescription": "Tanbish needs access to the photo library to select and upload user profile image and Listing Image to the server.",
        "NSPhotoLibraryAddUsageDescription": "Tanbish needs access to the photo library to select and upload user profile image and Listing Image to the server.",
        "NSLocationWhenInUseUsageDescription": "Tanbish usages device location on listing information, Listing search Data and User information.",
        "NSLocationAlwaysAndWhenInUseUsageDescription": "Tanbish usages device location on listing information, Listing search Data and User information.",
        "NSLocationAlwaysUsageDescription": "Tanbish uses device location on listing information, Listing search Data and User information.",
        "NSMicrophoneUsageDescription": "Tanbish uses your microphone while taking video of your product for uploading in listing information.",
        "CFBundleAllowMixedLocalizations": true,
        "UIBackgroundModes": [
          "remote-notification"
        ],
        "SKAdNetworkItems": [
          {
            "SKAdNetworkIdentifier": "v9wttpbfk9.skadnetwork"
          },
          {
            "SKAdNetworkIdentifier": "n38lu8286q.skadnetwork"
          }
        ]
      },
      "config": {
        "googleMapsApiKey": "AIzaSyCwx5yTQPJwVf04tUtMKPI1JGr4U6Bp9Yc"
      }
    },
    "android": {
      "package": "com.tanbish",
      "config": {
        "googleMaps": {
          "apiKey": "AIzaSyCwx5yTQPJwVf04tUtMKPI1JGr4U6Bp9Yc"
        }
      },
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "permissions": [
        "CAMERA",
        "CAMERA_ROLL",
        "MEDIA_LIBRARY",
        "READ_EXTERNAL_STORAGE",
        "WRITE_EXTERNAL_STORAGE",
        "RECORD_AUDIO",
        "READ_PHONE_STATE",
        "READ_CONTACTS",
        "LOCATION",
        "ACCESS_COARSE_LOCATION",
        "ACCESS_FINE_LOCATION",
        "RECEIVE_BOOT_COMPLETED",
        "android.permission.INTERNET",
        "POST_NOTIFICATIONS"
      ],
      "versionCode": 13
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "scheme": "tanbish",
    "extra": {
      "eas": {
        "projectId": "6b210f5b-435d-4f29-9f53-82dfd7abc16c"
      }
    }
  },
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-***************.......",
    "ios_app_id": "ca-app-pub-****************........"
  }
}

ios/Podfile

No response

android/build.gradle

No response

android/app/build.gradle

No response

android/settings.gradle

No response

AndroidManifest.xml

No response

dylancom commented 11 months ago

Why use 10.0.0 while we are on 12.1.2?

SalmanFaris53 commented 11 months ago

@dylancom i have upgraded to new version but still the same error iam facing

DoctorJohn commented 11 months ago

Did you install the new APK after rebuilding your project?

SalmanFaris53 commented 11 months ago

No iam using it in emulator wtih expo go

SalmanFaris53 commented 11 months ago

Screenshot_1694692442

dylancom commented 11 months ago

Please read the docs…

SalmanFaris53 commented 11 months ago

Some time iam getting this error also:- 'eventsNotifyReady' of null

and when i upgrade to latest verions iam getting:- Screenshot_1694694456

DoctorJohn commented 11 months ago

No iam using it in emulator wtih expo go

Expo go is not supported. That's also mentioned in our installation instructions.

SalmanFaris53 commented 11 months ago

So i need to take the apk build and test it isnt?

DoctorJohn commented 11 months ago

So i need to take the apk build and test it isnt?

Yes, correct!

And if you want to use features like hot-reloading for development, you can set up Expo dev client. That's basically your own custom "Expo Go" but with native code supported.

SalmanFaris53 commented 11 months ago

Thank you, it was the issue with the Expo Go, now its successfully running.