Add $ANDROID_HOME to linux PATH
Add $ANDROID_HOME to linux PATH
Error:
Solution:
Adding android sdk to the PATH
Open Terminal and run
If it returns a directory make sure it is infact the correct android sdk directory.
If it does not return anything then open terminal and type
or if you want graphical editor then
And add these
** Make sure the change the ANDROID_HOME to the correct directory
Then run this command for the changes to take effect
To check if it worked run
This should output the android sdk directory.
Code: Select all
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
Adding android sdk to the PATH
Open Terminal and run
echo $ANDROID_HOME
to view the current Android Home Path if any.If it returns a directory make sure it is infact the correct android sdk directory.
If it does not return anything then open terminal and type
Code: Select all
nano ~/.bash_profile
Code: Select all
gedit ~/.bash_profile
Code: Select all
export ANDROID_HOME='/home/<user_name>/Android/Sdk' <Path to android SDK>
export PATH=$PATH:$ANDROID_HOME/bin
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
Then run this command for the changes to take effect
Code: Select all
source ~/.bash_profile
Code: Select all
echo $ANDROID_HOME
Re: Add GRADLE to linux PATH
If you want to use cordova then you may have to add Gradle to the PATH too. If you have Android Studio installed then gradle will also be installed. You can use that version or you can install it separately.
Simply add this line to add Grade to the PATH
Change the <installed-gradle-version> to the correct installed version
Simply add this line to add Grade to the PATH
Code: Select all
export PATH=$PATH:/opt/android-studio/gradle/<installed-gradle-version>/bin
Who is online
Users browsing this forum: No registered users and 1 guest