Ubuntu Cordova - Build with problem

1

I'm uploading the cordova on Ubuntu 64, but I'm having a 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

My ~/.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 the AVD, but when I give build to the cordo, it has this error.

My android studio works, I have already been able to compile a widget project that I have, without problems, Cordova that is giving zica.

    
asked by anonymous 26.01.2016 / 19:54

1 answer

1

I managed to solve a few hours and many cups of coffee later.

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

So not to fall in this situation I give sudo su and work without sudo with the cord, that did not give problem.

If the problem persists, you have to scan permission for some folders.

    
27.01.2016 / 11:53