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:
- export android_home=/path/to/android/sdk
- export path=$path:$android_home/bin
you can same ant. java jdk
add /etc/profile file:
- java_home=/path/to/jdk
- jre_home=$java_home/jre
- path=$path:$java_home/bin:$jre_home/bin
- export java_home
- export jre_home
- export path
now in terminal, type echo $path , make sure environment variables added path!
Comments
Post a Comment