Closed krestia closed 1 year ago
@krestia
Cordova CLI version
@EMI-INDO
Hi, I used default cordova project : cordova create hello , then add this plugin and result failed
i used your example and adding it in index.html, result failed
D:\5.GAME\Cordova\1new\hello>node -v v18.14.1
D:\5.GAME\Cordova\1new\hello>gradle -v
Build time: 2022-03-31 15:25:29 UTC Revision: 540473b8118064efcc264694cbcaa4b677f61041
Kotlin: 1.5.31 Groovy: 3.0.9 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 1.8.0_144 (Oracle Corporation 25.144-b01) OS: Windows 8.1 6.3 amd64
D:\5.GAME\Cordova\1new\hello>cordova --version 10.0.0 (cordova-lib@10.1.0)
D:\5.GAME\Cordova\1new\hello>cordova platform is Installed platforms: android 8.1.0 Available platforms: browser ^6.0.0 electron ^1.1.1 windows ^7.0.0
D:\5.GAME\Cordova\1new\hello>cordova plugin is cordova-plugin-whitelist 1.3.5 "Whitelist" emi-indo-cordova-plugin-admob 1.0.9 "emiAdmobPlugin"
i also used androidx and androidx adapter plugin, but doesn't solved the issue
@krestia
If there are still problems contact me back
@EMI-INDO
Hi, many thanks
it is work!
D:\5.GAME\Cordova\1new\hello>cordova --version 10.0.0 (cordova-lib@10.1.0)
D:\5.GAME\Cordova\1new\hello>cordova platforms is Installed platforms: android 11.0.0 Available platforms: browser ^6.0.0 electron ^1.1.1 windows ^7.0.0
D:\5.GAME\Cordova\1new\hello>cordova plugin is cordova-plugin-whitelist 1.3.5 "Whitelist" emi-indo-cordova-plugin-admob 1.0.9 "emiAdmobPlugin"
@krestia
If you are using cordova 11.0.0 please delete cordova-plugin-whitelist
cordova plugin rm cordova-plugin-whitelist
add in config.xml
AndroidXEnabled = true
<widget>
<platform name="android">
<preference name="AndroidXEnabled" value="true" />
</platform>
</widget>
@EMI-INDO
yes i build an .apk succesfully with your suggestion.
i used your template code (.js) and (.html) but the ads not showing. because i am not sure what i.m missing, show i don't mention it in my reply before.
your sugestion : If you are using cordova 11.0.0 please delete cordova-plugin-whitelist
cordova plugin rm cordova-plugin-whitelist
add in config.xml
AndroidXEnabled = true `
@krestia
Do not test real ads directly, admob account will be suspended.
To test real ads you must upload the apk/aab in the play store, until the release is approved, you must download it directly from the play store, do not click on ads in the application itself it can cause ad serving to be limited.
https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/discussions/11
@EMI-INDO Thanks, I take down my comment before.
with last setting, my interstitial ads showed but in blank screen. For me, it because of the ads (function) do not work in eventlistener function (document.addEventListener("deviceready", function()) through index.html, but it must called in runtime.
your plugin and example working good, it is only in my app that need some adjustment.
i can close this issue
i try to build with hello cordova and success build an .apk, but when i add this plugin, it always fail
BUILD FAILED in 18s D:\5.GAME\Cordova\1new\hello\platforms\android\gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.