Open davidvinoth opened 3 years ago
@davidvinoth did you find any solution for this?
@davidvinoth did you find any solution for this?
I am using the plugin only for opening notification settings so I commented out the biometric part in NativeSettings.java
platforms/android/app/src/main/java/com/phonegap/plugins/nativesettings/NativeSettings.java - comment else if (action.equals("biometric")) block
Getting error in build after adding the plugin in ionic 3
[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. [cordova] [cordova] Get more help at https://help.gradle.org [cordova] [cordova] BUILD FAILED in 5s [cordova] :app:compileDebugJavaWithJavac FAILED [cordova] 35 actionable tasks: 5 executed, 30 up-to-date [cordova] [cordova] D:\smoresup\smoresup_4>if "1" == "0" goto mainEnd [cordova] [cordova] D:\smoresup\smoresup_4>rem Set variable GRADLE_EXIT_CONSOLE if you need the script return code instead of [cordova] [cordova] D:\smoresup\smoresup_4>rem the cmd.exe /c return code! [cordova] [cordova] D:\smoresup\smoresup_4>if not "" == "" exit 1 [cordova] [cordova] D:\smoresup\smoresup_4>exit /b 1 [cordova] Command finished with error code 1: cmd /s /c "D:\smoresup\smoresup_4\platforms\android\gradlew.bat cdvBuildDebug -b D:\smoresup\smoresup_4\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m" [cordova] cmd: Command failed with exit code 1 Error output: [cordova] D:\smoresup\smoresup_4\platforms\android\app\src\main\java\com\phonegap\plugins\nativesettings\NativeSettings.java:67: error: cannot find symbol [cordova] } else / if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { [cordova] ^ [cordova] symbol: variable P [cordova] location: class VERSION_CODES [cordova] D:\smoresup\smoresup_4\platforms\android\app\src\main\java\com\phonegap\plugins\nativesettings\NativeSettings.java:68: error: cannot find symbol [cordova] intent = new Intent(android.provider.Settings.ACTION_FINGERPRINT_ENROLL); [cordova] ^ [cordova] symbol: variable ACTION_FINGERPRINT_ENROLL [cordova] location: class Settings [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. [cordova] [cordova] Get more help at https://help.gradle.org [cordova] [cordova] BUILD FAILED in 5s [cordova] Error: cmd: Command failed with exit code 1 Error output: [cordova] D:\smoresup\smoresup_4\platforms\android\app\src\main\java\com\phonegap\plugins\nativesettings\NativeSettings.java:67: error: cannot find symbol [cordova] } else / if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { [cordova] ^ [cordova] symbol: variable P [cordova] location: class VERSION_CODES [cordova] D:\smoresup\smoresup_4\platforms\android\app\src\main\java\com\phonegap\plugins\nativesettings\NativeSettings.java:68: error: cannot find symbol [cordova] intent = new Intent(android.provider.Settings.ACTION_FINGERPRINT_ENROLL); [cordova] ^ [cordova] symbol: variable ACTION_FINGERPRINT_ENROLL [cordova] location: class Settings [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. [cordova] [cordova] * Get more help at https://help.gradle.org [cordova] [cordova] BUILD FAILED in 5s [cordova] at ChildProcess.whenDone (D:\smoresup\smoresup_4\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23) [cordova] at ChildProcess.emit (events.js:198:13) [cordova] at maybeClose (internal/child_process.js:982:16) [cordova] at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
Ionic:
ionic (Ionic CLI) : 4.11.0 (C:\Users\davidvinoth.jayachan\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 7.1.4 Cordova Plugins : not available
System:
Android SDK Tools : 26.1.1 (C:\Users\davidvinoth.jayachan\AppData\Local\Android\Sdk) NodeJS : v10.21.0 (C:\Program Files\nodejs\node.exe) npm : 6.14.9 OS : Windows 8.1
I tried changing sdk version from 27 to 29 in build.gradle file but build still getting failed defaultBuildToolsVersion="29.0.3" //String defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 5.1 defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default defaultCompileSdkVersion=29 //Integer - We ALWAYS compile with the latest by default