PhoneGap - Cordova build android faild -


i'm new in phonegap. have problem when try build cordova :

sudo cordova build android

here log :

running command: /home/paul/documents/projets/tozer0-app/platforms/android/cordova/build  [error: failed find 'java_home' environment variable. try setting setting manually.] error building 1 of platforms: error: /home/paul/documents/projets/tozer0-app/platforms/android/cordova/build: command failed exit code 2 may not have required environment or os build project error: /home/paul/documents/projets/tozer0-app/platforms/android/cordova/build: command failed exit code 2 

any idea ?

just add java_home , android_home , ant_home path , point out corresponding bin directory as: android studio

add ~/.bashrc file:

  1. export android_home=/path/to/android/sdk
  2. export path=$path:$android_home/bin

you can same ant. java jdk

add /etc/profile file:

  1. java_home=/path/to/jdk
  2. jre_home=$java_home/jre
  3. path=$path:$java_home/bin:$jre_home/bin
  4. export java_home
  5. export jre_home
  6. export path

now in terminal, type echo $path , make sure environment variables added path!


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -