Admobfree error

Hello everyone,

I recently updated my npm packages which where outdated to the ‘wanted’ version as shown by npm, and updated all cordova plugins with the npm package cordova-check-plugins.
It gave me all sort of errors, so I removed all traces of admobfree from my package.json, removed my package-lokc.json and node_modules. Then I reinstalled it using ionic-native documentation. I still get the errors:

:app:generateDebugSources UP-TO-DATE
:app:javaPreCompileDebug
 UP-TO-DATE
:app:compileDebugJavaWithJavac
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:27: error: package name.ratson.cordova.admob.banner does not exist
import name.ratson.cordova.admob.banner.BannerExecutor;
                                       ^
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:28: error: package name.ratson.cordova.admob.interstitial does not exist
import name.ratson.cordova.admob.interstitial.InterstitialExecutor;
                                             ^
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:29: error: package name.ratson.cordova.admob.rewardvideo does not exist
import name.ratson.cordova.admob.rewardvideo.RewardVideoExecutor;
                                            ^
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:44: error: cannot find symbol
    private BannerExecutor bannerExecutor = null;
            ^
  symbol:   class BannerExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:45: error: cannot find symbol
    private InterstitialExecutor interstitialExecutor = null;
            ^
  symbol:   class InterstitialExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:46: error: cannot find symbol
    private RewardVideoExecutor rewardVideoExecutor = null;
            ^
  symbol:   class RewardVideoExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:70: error: cannot find symbol

            bannerExecutor = new BannerExecutor(this);
                                 ^
  symbol:   class BannerExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:73: error: cannot find symbol
            interstitialExecutor = new InterstitialExecutor(this);
                                       ^
  symbol:   class InterstitialExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:76: error: cannot find symbol
            rewardVideoExecutor = new RewardVideoExecutor(this);
                                      ^
  symbol:   class RewardVideoExecutor
  location: class AdMob
Note: Some input files use or override a deprecated API.
 FAILED
Note: Recompile with -Xlint:deprecation for details.
9 errors

27 actionable tasks: 1 executed, 26 up-to-date
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
(node:6892) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:27: error: package name.ratson.cordova.admob.banner does not exist
import name.ratson.cordova.admob.banner.BannerExecutor;
                                       ^
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:28: error: package name.ratson.cordova.admob.interstitial does not exist
import name.ratson.cordova.admob.interstitial.InterstitialExecutor;
                                             ^
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:29: error: package name.ratson.cordova.admob.rewardvideo does not exist
import name.ratson.cordova.admob.rewardvideo.RewardVideoExecutor;
                                            ^
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:44: error: cannot find symbol
    private BannerExecutor bannerExecutor = null;
            ^
  symbol:   class BannerExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:45: error: cannot find symbol
    private InterstitialExecutor interstitialExecutor = null;
            ^
  symbol:   class InterstitialExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:46: error: cannot find symbol
    private RewardVideoExecutor rewardVideoExecutor = null;
            ^
  symbol:   class RewardVideoExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:70: error: cannot find symbol
            bannerExecutor = new BannerExecutor(this);
                                 ^
  symbol:   class BannerExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:73: error: cannot find symbol
            interstitialExecutor = new InterstitialExecutor(this);
                                       ^
  symbol:   class InterstitialExecutor
  location: class AdMob
D:\Sync\Documents\projects\comfort\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:76: error: cannot find symbol
            rewardVideoExecutor = new RewardVideoExecutor(this);
                                      ^
  symbol:   class RewardVideoExecutor
  location: class AdMob
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
(node:6892) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Anyone knows how to resolve, or should I open an issue on github, and if so, on ionic-native or the cordova plugin?

Hi. I’m getting the same error. I wonder if you could solve it. Greetings

It’s a problem with the whole plugin, also happening on Cordova projects. I’ve downgraded a few times to version 0.11 after several tries I managed to get it working but it’s not so simple

1 Like

Thanks for answering. Sorry but what’s the whole version you installed and it’s working?
Greetings dude

I downgraded back to version 0.11 by changing the values in my package.json

I’ll try man. Thanks for answering

I managed to solve the issue by copying the sources from platforms/android/src/name/ratson/cordova/admob/* to platforms/android/app/src/main/java/name/ratson/cordova/admob/.

Hope it helps.

6 Likes

very good @hrqnogueira it works for me!:+1::ok_hand:

thats worked me too.Thanks

Hi everyone
I solved this error.
Admobfree plugin run with android 6.3.0

My project downgrade android 7.0.0 to 6.3.0 and no show error

Hell i did what you told us but now i’m getting this error

Dex: Error converting bytecode to dex: Cause: PARSE ERROR: class name (com/google/android/gms/base/R) does not match path (Com/google/android/gms/base/R.class) ...while parsing Com/google/android/gms/base/R.class

Very nice man! Thanks for help!!! =D … worked for me too

Thanks, this method worked for me but only using version ^0.11.0 of Native AdMob Free. Even using Android 7.0.0 :wink:

how did you do it?
I try to fix that error. please help

hello. im new in this can you tell me how i change it with details please