IonicWebViewEngine.java:137: error: cannot find symbol

Table of Contents

IonicWebViewEngine.java:137: error: cannot find symbol

| Error: cannot find symbol variable LOLLIPOP

[cordova] D:\sync\websvr\ionic\test\reader\envirotech_book_reader_mobile\platforms\android\app\src\main\java\com\ionicframework\cordova\webview\IonicWebViewEngine.java:11: error: package android.support.annotation does not exist
[cordova] import android.support.annotation.RequiresApi;
[cordova]                                  ^
[cordova] D:\sync\websvr\ionic\test\reader\envirotech_book_reader_mobile\platforms\android\app\src\main\java\com\ionicframework\cordova\webview\IonicWebViewEngine.java:137: error: cannot find symbol
[cordova]     @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
[cordova]      ^
[cordova]   symbol:   class RequiresApi
[cordova]   location: class com.ionicframework.cordova.webview.IonicWebViewEngine.ServerClient
[cordova] Note: Some input files use or override a deprecated API.
[cordova] Note: Recompile with -Xlint:deprecation for details.
[cordova] 2 errors
[cordova]
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:compileDebugJavaWithJavac'.
[cordova] > Compilation failed; see the compiler error output for details.
[cordova]
[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]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 4s
[cordova] Command failed with exit code 1: D:\sync\websvr\ionic\test\reader\envirotech_book_reader_mobile\platforms\android\gradlew cdvBuildDebug -b D:\sync\websvr\ionic\test\reader\envirotech_book_reader_mobile\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd build android --device exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Run:

ionic cordova plugin add cordova-plugin-androidx-adapter

Leave a Reply

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