cordova requirements android --verbose
answer:
cordova requirements android --verbose
PlatformApi successfully found for platform android
Android Studio project detected
PlatformApi successfully found for platform browser
Running command: avdmanager list target
Command finished with error code ENOENT: avdmanager list,target
Running command: android list target
Command finished with error code ENOENT: android list,target
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: not installed
Failed to find 'ANDROID_HOME' environment variable. Try setting it manually.
Detected 'adb' command at /usr/bin but no 'platform-tools' directory found near.
Try reinstall Android SDK or update your PATH to include valid path to SDK/platform-tools directory.
Android target: not installed
android: Command failed with exit code ENOENT
Gradle: not installed
Could not find gradle wrapper within Android SDK. Could not find Android SDK directory.
Might need to install Android SDK or set up 'ANDROID_HOME' env variable.
Requirements check results for browser:
(node:9731) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'forEach' of undefined
at /usr/local/lib/node_modules/cordova/src/cli.js:397:35
at Array.map (<anonymous>)
at /usr/local/lib/node_modules/cordova/src/cli.js:388:68
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
at process._tickCallback (internal/process/next_tick.js:61:11)
(node:9731) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9731) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Edit ~/.bashrc file
Open file in editor (VSCode)
code ~/.bashrc .
Android-SDK install
sudo apt-get install android-sdk