我无法使用cordova运行离子应用
sudo ionic cordova run android
[ERROR] Error while getting native targets for android: No valid Android SDK
root found.
This error occurred while using native-run. You can try running this
command with --no-native-run, which will revert to using Cordova.
sudo cordova requirements android --verbose
[sudo] password for bug:
Platform API successfully found in: /home/bug/Escritorio/ionicapp/platforms/android/cordova/Api.js
Requirements check results for android:
Java JDK: not installed
Failed to find 'JAVA_HOME' environment variable. Try setting it manually.
Android SDK: installed true
Android target: not installed
Command failed with ENOENT: android list target
spawn android ENOENT
Gradle: installed /usr/share/gradle/bin/gradle
Some of requirements check failed
CordovaError: Some of requirements check failed
at /usr/lib/node_modules/cordova/src/cli.js:422:27
at processTicksAndRejections (internal/process/task_queues.js:97:5)
sudo nano /etc/profile
export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64"
export PATH=$PATH:$JAVA_HOME/bin
export ANDROID_SDK_ROOT=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/tools
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
当我运行命令 sudo cordova requirements android --verbose 时,我收到消息 java jdk not installed。已经安装