Ubuntu Cordova - Build with problem

Asked

Viewed 2,842 times

1

Guys I’m going up Cordova on Ubuntu 64, but I’m having build problem.

[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.]

ERROR building one of the platforms: Error: /home/boschini/Desktop/Cordova/ProjetoX/platforms/android/cordova/build: Command failed with exit code 2

You may not have the required environment or OS to build this project
Error:
/home/boschini/Desktop/Cordova/ProjetoX/platforms/android/cordova/build: Command failed with exit code 2

Man ~/.bashrc

JAVA_HOME=/usr/lib/jvm/java-7-oracle
export JAVA_HOME
PATH=$PATH:$JAVA_HOME

export ANDROID_HOME=/home/boschini/Android/Sdk
export ANDROID_TOOLS=/home/boschini/Android/Sdk/tools
export ANDROID_PLATFORM_TOOLS=/home/boschini/Android/Sdk/platform-tools

export PATH=${PATH}:/home/boschini/android-sdk-linux/platform-tools
export PATH=${PATH}:/home/boschini/android-sdk-linux/tools

When I call android on the console, it opens the normal SDK Manager, I can open AVD, but when I give build in Cordova, it presents this error.

My android studio works, already managed to compile a widget project that I have, no problems, the Cordova that is giving Zica.

1 answer

1


I managed to settle a few hours and a lot of coffee cups after.

The problem occurs because of permissions, when I surround the cordova build without sudo then the problem did not occur.

Then not to fall into this situation I give sudo su and work without sudo with the Ordova, there gave no problem.

If the problem persists, you have to parse some folder permission.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.