Reputation: 1
I set android home environment variable like this
export ANDROID_HOME=/home/associate/Android/Sdk export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
After run cordova requirements android --verbose it show
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true Android target: installed android-29,android-28,android-27,android-26,android-25,android-24,android-23,android-22,android-21
Gradle: installed /home/associate/android-studio/gradle-5.1/bin/gradle
================ The error is ===============
After run sudo cordova build android command from under a cordova project, it show
Failed to find 'ANDROID_HOME' environment variable. Try setting it manually. Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
Upvotes: 0
Views: 275
Reputation: 1
you don't need create ANDROID_HOME. In System variables, choose Path and click edit it. In Edit Environment variable click new and add path like : D:\folder_android_sdk\platform-tools and try again. Hope to help you
Upvotes: 0