error: cannot find symbol

Table of Contents error: cannot find symbol

[cordova] D:\sync\websvr\ionic\test\reader\envirotech_book_reader_mobile\platforms\android\app\src\main\java\name\ratson\cordova\admob\ error: cannot find symbol
[cordova]     @NonNull
[cordova]      ^
[cordova]   symbol:   class NonNull
[cordova]   location: class name.ratson.cordova.admob.AdMob
[cordova] Note: Some input files use or override a deprecated API.
[cordova] Note: Recompile with -Xlint:deprecation for details.
[cordova] 4 errors
[cordova] FAILURE: Build failed with an exception.
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:compileDebugJavaWithJavac'.
[cordova] > Compilation failed; see the compiler error output for details.
[cordova] * Try:
[cordova] 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.
[cordova] * Get more help at

You need to modify platforms/android/app/src/main/java/name/ratson/cordova/admob/ file.

Replace line 5 of file:



import androidx.annotation.NonNull;

You'll also need cordova-plugin-androidx plugin to be installed.

cordova plugin add cordova-plugin-androidx


Leave a Reply

Your email address will not be published. Required fields are marked *