Closed RonJones32 closed 6 months ago
Hi @RonJones32 before => abstract class ReactNativeGoogleMobileAdsFullScreenAdModule T replace => abstract class ReactNativeGoogleMobileAdsFullScreenAdModule T : Any < > don't forget these too
If you do this, the error will be fixed, but it will need to be done again with each package installation.
@Sygn53
`BUILD FAILED in 12s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
e: file:///Users/ronaldjones/Documents/Apps/ATHApp/node_modules/react-native-google-mobile-ads/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsAppOpenModule.kt:31:59 Too many arguments for public constructor ReactNativeGoogleMobileAdsFullScreenAdModule
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more details`
If you do this it will be ok. Do yarn or npm install first Have a nice day :) @RonJones32 If it still doesn't work, add this to app build gradle; buildscript { ext { ... kotlin_version = '1.9.21' } }
@Sygn53 /node_modules/react-native-google-mobile-ads/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsRewardedModule.kt:50:3 'loadAd' overrides nothing FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-google-mobile-ads:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more details 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 27s.
Correct signature for latest Kotlin is override fun onAdLoaded(ad: T & Any)
@inckie what about "loadAD"? Same error
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.
@github-actions still requires attention
Attention == PR, if you propose a PR we can merge it and close it
Note that most people likely are not hitting this because the majority of the react-native ecosystem (and indeed any project still created by the current react-native template in 0.73.x is on kotlin 1.8
I believe this is a kotlin 1.9 change
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.
Requires attention still
Ron Jones Jr Sr. Mobile Developer CEO of Collective Minds Inc Owner of Are They Hooping
On Sun, Mar 17, 2024 at 11:38 PM github-actions[bot] < @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/invertase/react-native-google-mobile-ads/issues/511#issuecomment-2002870644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL2M7BFYZ2OOQU3GNI52O43YYZOUTAVCNFSM6AAAAABBHSBQ2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSHA3TANRUGQ . You are receiving this because you were mentioned.Message ID: @.*** com>
Just merged a fix here thanks to @YannickBruening 👏
What happened?
Hello, I am trying to implement Google Ads with React Native and am getting the error that is the subject of this message. More specifically, when trying to implement, I get a compilation error that describes that the full screen ad module has no override for the method onAdLoaded. This error persists whether I try to import the ad modules or not. I am using react-native-google-mobile-ads with min sdk 21 and compile sdk 33. This error is on android. I have verified my appId. This error persists on any device.
Platforms
Android, but have not tested behavior on iOS
React Native Info
Are your using Typescript?
package.json
app.json
ios/Podfile
android/build.gradle
android/app/build.gradle
android/settings.gradle
AndroidManifest.xml