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
702 stars 142 forks source link

property 'react-native-google-mobile-ads' is not allowed #319

Closed adarshkhatri closed 1 year ago

adarshkhatri commented 1 year ago

What happened?

I am trying to install and use this package for my old expo project to replace the deprecated expo Admob package.

There is an instruction to add these in my app.js, however, I am getting this warning as soon as I add it:

Instruction image

Warning: image

Error on expo build android: image

Platforms

Android, but have not tested behavior on iOS

React Native Info

info Fetching system and libraries information...
(node:91093) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
    OS: macOS 12.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
    Memory: 364.85 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.3.1 - /usr/local/bin/npm
    Watchman: 2023.01.16.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      API Levels: 30
      Build Tools: 30.0.3
      System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.2 AI-202.7660.26.42.7351085
    Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: ^0.68.2 => 0.68.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
info React Native v0.71.1 is now available (your project is running on v0.68.2).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.71.1.
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.68.2.
info To upgrade, run "react-native upgrade".

Are your using Typescript?

package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "test": "jest --watchAll"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/netinfo": "8.2.0",
    "@react-native-masked-view/masked-view": "0.2.6",
    "@react-navigation/bottom-tabs": "^5.3.1",
    "@react-navigation/native": "^5.2.1",
    "@react-navigation/stack": "^5.2.16",
    "expo": "^45.0.0",
    "expo-asset": "~8.5.0",
    "expo-clipboard": "~3.0.1",
    "expo-constants": "~13.1.1",
    "expo-dev-client": "~1.0.1",
    "expo-device": "~4.2.0",
    "expo-file-system": "~14.0.0",
    "expo-font": "~10.1.0",
    "expo-linking": "~3.1.0",
    "expo-splash-screen": "~0.15.1",
    "expo-sqlite": "~10.2.0",
    "expo-store-review": "~5.2.0",
    "expo-updates": "~0.13.4",
    "expo-web-browser": "~10.2.1",
    "google-input-tool": "^1.4.3",
    "native-base": "2.13.8",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "^0.68.2",
    "react-native-cli": "^2.0.1",
    "react-native-elements": "^2.0.4",
    "react-native-gesture-handler": "~2.2.1",
    "react-native-google-mobile-ads": "^8.2.3",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "~3.11.1",
    "react-native-vector-icons": "^6.7.0",
    "react-native-web": "0.17.7",
    "sentry-expo": "^4.2.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/react": "~17.0.21",
    "babel-preset-expo": "~9.1.0",
    "jest-expo": "^45.0.0",
    "typescript": "~4.3.5"
  },
  "private": true
}

app.json

{
  "expo": {
    "name": "xxx",
    "slug": "xxx",
    "platforms": [
      "ios",
      "android",
      "web"
    ],
    "version": "9",
    "orientation": "portrait",
    "icon": "./assets/images/android-icon.png",
    "scheme": "myapp",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#10b9ce"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "buildNumber": "8.0.2",
      "supportsTablet": true,
      "bundleIdentifier": "com.xxx",
      "config": {
        "usesNonExemptEncryption": false
      },
      "infoPlist": {
        "GADApplicationIdentifier": "ca-app-pub-xxx"
      },
      "appStoreUrl": "https://apps.apple.com/au/app/xxx/idxxx"
    },
    "android": {
      "versionCode": 11,
      "package": "com.xxx",
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/android-icon.png"
      },
      "playStoreUrl": "https://play.google.com/store/apps/details?id=com.xxxx"
    },
    "web": {
      "favicon": "./assets/images/favicon.png"
    },
    "hooks": {
      "postPublish": [
        ...
      ]
    },
    "extra": {
      "eas": {
        "projectId": "xxx"
      }
    }
  },
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
    "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
  }
}

ios/Podfile

No response

android/build.gradle

No response

android/app/build.gradle

No response

android/settings.gradle

No response

AndroidManifest.xml

No response

github-actions[bot] commented 1 year ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.