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

[šŸ›] Application does not compile #91

Closed Ivandeclei closed 2 years ago

Ivandeclei commented 2 years ago

Issue

my application doesn't compile, I already checked the build.gradlew file but I didn't see a difference in the example application file.


Project Files

Javascript

Click To Expand

#### `package.json`: ```json # N/A ``` #### `admob.json`: ```json # N/A ```

iOS

Click To Expand

#### `ios/Podfile`: ```ruby # N/A ``` --- ### Android

Click To Expand

#### `android/build.gradle`: ```groovy // N/A ``` #### `android/app/build.gradle`: > Configure project :react-native-google-mobile-ads :react-native-google-mobile-ads package.json found at C:\Users\ivand\Documents\Projetos\Mineracao_Anki_ingles\NickApp\node_modules\react-native-google-mobile-ads\package.json Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * Where: Build file 'C:\Users\ivand\Documents\Projetos\Mineracao_Anki_ingles\NickApp\node_modules\react-native-google-mobile-ads\android\build.gradle' line: 59 * What went wrong: A problem occurred evaluating project ':react-native-google-mobile-ads'. > Cannot get property 'googleMobileAdsJson' on extra properties extension as it does not exist * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: A problem occurred configuring project ':react-native-google-mobile-ads'. > com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ============================================================================== * Get more help at https://help.gradle.org BUILD FAILED in 50s error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * Where: Build file 'C:\Users\ivand\Documents\Projetos\Mineracao_Anki_ingles\NickApp\node_modules\react-native-google-mobile-ads\android\build.gradle' line: 59 * What went wrong: A problem occurred evaluating project ':react-native-google-mobile-ads'. > Cannot get property 'googleMobileAdsJson' on extra properties extension as it does not exist * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: A problem occurred configuring project ':react-native-google-mobile-ads'. > com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ============================================================================== * Get more help at https://help.gradle.org BUILD FAILED in 50s at makeError (C:\Users\ivand\Documents\Projetos\Mineracao_Anki_ingles\NickApp\node_modules\execa\index.js:174:9) at C:\Users\ivand\Documents\Projetos\Mineracao_Anki_ingles\NickApp\node_modules\execa\index.js:278:16 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async runOnAllDevices (C:\Users\ivand\Documents\Projetos\Mineracao_Anki_ingles\NickApp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5) at async Command.handleAction (C:\Users\ivand\Documents\Projetos\Mineracao_Anki_ingles\NickApp\node_modules\@react-native-community\cli\build\index.js:192:9) info Run CLI with --verbose flag for more details. PS C:\Users\ivand\Documents\Projetos\Mineracao_Anki_ingles\NickApp> ```groovy // N/A ``` #### `android/settings.gradle`: ```groovy // N/A ``` #### `AndroidManifest.xml`: ```xml ```

--- ## Environment
Click To Expand

**`react-native info` output:** ``` OUTPUT GOES HERE ``` buld.gradle ` buildscript { ext { kotlinVersion = "1.5.30" buildToolsVersion = "30.0.2" minSdkVersion = 21 compileSdkVersion = 31 targetSdkVersion = 31 ndkVersion = "21.4.7075529" } repositories { google() mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath("com.android.tools.build:gradle:4.2.2") classpath 'com.google.gms:google-services:4.3.10' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } mavenCentral { // We don't want to fetch react-native from Maven Central as there are // older versions over there. content { excludeGroup "com.facebook.react" } } google() maven { url 'https://www.jitpack.io' } maven { url "$rootDir/../node_modules/detox/Detox-android" } //jcenter() }` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **Are you using `TypeScript`?** - `Y/N` & `VERSION`

--- - šŸ‘‰ Check out [`Invertase`](https://twitter.com/invertaseio) on Twitter for updates on the library.
mikehardy commented 2 years ago

My application compiles fine, with exactly as much proof of same and reproduction details as you have provided! (that is, none - so, we can't help)

You can always try our example app, it's built from a script (so you can see how to do things correctly when integrating) and runs