Does anyone have any idea about this error? please help me
I got this while ionic Cordova run android
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/usr/lib/android-sdk (DEPRECATED)
Requirements check failed for JDK 8 (‘1.8.*’)! Detected version: 11.0.4
Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.
[ERROR] An error occurred while running cordova run android (exit code 1).
This seems to be saying that it wants JDK 8, yet can only find 11. So I would install JDK 8.
although i have installed jdk 8 im getting this error
ionic cordova run android
[INFO] Running app-scripts build: --platform android --target cordova
[12:05:22] build dev started …
[12:05:22] clean started …
[12:05:22] clean finished in 4 ms
[12:05:22] copy started …
[12:05:22] deeplinks started …
[12:05:22] deeplinks finished in 147 ms
[12:05:22] transpile started …
[12:05:27] transpile finished in 4.66 s
[12:05:27] preprocess started …
[12:05:27] preprocess finished in less than 1 ms
[12:05:27] webpack started …
[12:05:27] copy finished in 5.05 s
[12:05:32] webpack finished in 5.20 s
[12:05:32] sass started …
[12:05:33] sass finished in 1.29 s
[12:05:33] postprocess started …
[12:05:33] postprocess finished in 18 ms
[12:05:33] lint started …
[12:05:33] build dev finished in 11.50 s
ionic cordova prepare
cordova prepare
Running command - done!
cordova run android
[12:05:39] lint finished in 5.35 s
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/home/rithesh/Android/Sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
Task :app:preBuild
UP-TO-DATE
Task :CordovaLib:preBuild
UP-TO-DATE
Task :CordovaLib:preDebugBuild UP-TO-DATE
Task :CordovaLib:checkDebugManifest UP-TO-DATE
Task :CordovaLib:processDebugManifest UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :CordovaLib:compileDebugAidl NO-SOURCE
Task :app:compileDebugAidl NO-SOURCE
Task :CordovaLib:packageDebugRenderscript NO-SOURCE
Task :app:compileDebugRenderscript UP-TO-DATE
Task :app:checkDebugManifest UP-TO-DATE
Task :app:generateDebugBuildConfig UP-TO-DATE
Task :app:prepareLintJar UP-TO-DATE
Task :app:generateDebugSources UP-TO-DATE
Task :CordovaLib:compileDebugRenderscript UP-TO-DATE
Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE
Task :CordovaLib:generateDebugResValues UP-TO-DATE
Task :CordovaLib:generateDebugResources UP-TO-DATE
Task :CordovaLib:packageDebugResources UP-TO-DATE
Task :CordovaLib:generateDebugRFile UP-TO-DATE
Task :CordovaLib:prepareLintJar UP-TO-DATE
Task :CordovaLib:generateDebugSources UP-TO-DATE
Task :CordovaLib:javaPreCompileDebug UP-TO-DATE
Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
Task :CordovaLib:processDebugJavaRes NO-SOURCE
Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
Task :app:javaPreCompileDebug UP-TO-DATE
Task :app:mainApkListPersistenceDebug UP-TO-DATE
Task :app:generateDebugResValues UP-TO-DATE
Task :app:generateDebugResources UP-TO-DATE
Task :app:mergeDebugResources UP-TO-DATE
Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
Task :app:processDebugManifest UP-TO-DATE
Task :app:processDebugResources UP-TO-DATE
Task :app:compileDebugJavaWithJavac UP-TO-DATE
Task :app:compileDebugNdk NO-SOURCE
Task :app:compileDebugSources UP-TO-DATE
Task :app:mergeDebugShaders UP-TO-DATE
Task :app:compileDebugShaders
UP-TO-DATE
Task :app:generateDebugAssets UP-TO-DATE
Task :CordovaLib:mergeDebugShaders UP-TO-DATE
Task :CordovaLib:compileDebugShaders UP-TO-DATE
Task :CordovaLib:generateDebugAssets UP-TO-DATE
Task :CordovaLib:packageDebugAssets UP-TO-DATE
Task :app:mergeDebugAssets
Task :app:validateSigningDebug UP-TO-DATE
Task :app:signingConfigWriterDebug UP-TO-DATE
Task :app:transformClassesWithDexBuilderForDebug UP-TO-DATE
Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug UP-TO-DATE
Task :app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE
Task :app:mergeDebugJniLibFolders UP-TO-DATE
Task :CordovaLib:compileDebugNdk
NO-SOURCE
Task :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
Task :CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
Task :CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
Task :app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
Task :app:processDebugJavaRes NO-SOURCE
Task :app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
Task :app:packageDebug
Task :app:assembleDebug
Task :app:cdvBuildDebug
BUILD SUCCESSFUL in 3s
42 actionable tasks: 2 executed, 40 up-to-date
Built the following apk(s):
/home/rithesh/codes/wealthmanagement/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/home/rithesh/Android/Sdk (DEPRECATED)
No target specified, deploying to device ‘25aade7b’.
Using apk: /home/rithesh/codes/wealthmanagement/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Package name: io.ionic.starter
Failed to execute shell command “input,keyevent,82"” on device: Error: adb: Command failed with exit code 137
[ERROR] An error occurred while running cordova run android (exit code 1).