I have been all over this site, so please forgive me if someone else as posted this but I could not find anything that could fix my issue.
I am working on a Mac. With my IOS build, I have no problems at all.
However with Android, I am 'now' having some issues, when I run cordova build android
I get the following error,
/Users/x/Library/Android/sdk/tools/ant/build.xml:601: The following error occurred while executing this line:
/Users/x/Library/Android/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/Users/x/Library/Android/sdk/tools/ant/build.xml:734: Class not found: javac1.8
/Users/x/Desktop/One/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,/Users/x/Desktop/test/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
ERROR building one of the platforms: Error: /Users/x/Desktop/test/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
I use the word 'now' because this error I thought I had fixed and it was working but I have changed nothing with the PATHS
Any where in my terminal, I can run javac - version
which gives me javac 1.8.0_25
. So it can different see java.
So I thought Apache Ant might have gone wrong, but when I run ant -version
I get Apache Ant(TM) version 1.9.4 compiled on April 29 2014
- So yes I am running Ant version 1.9.4, which as far as I am aware should work with my java version?
So my system can access but java & ant without any issue but I can not build my new Android app. I am now running this in a clean, new (without any plugins or my code) build and still it will not work.
Any help?
Thanks
I solve my problem. On my config.xml I missed the platform tag ir order to configure the icons and splash screen:
<platform name="ios">
</platform>
<platform name="android">
</platform>
Here is the Cordova doc
Maybe you have something misconfigured like me. Hope It helps
Tried my android app on two different Linux machines, the first at work, the second at home. Had the same error at home while it had worked at the office. When I started :
adb logcat
I discovered that, after the .apk upload, my android device rejected it because the signature was different than my previous build.
The solution was dead simple: uninstall the previous version on the device.
Check your device log, error may come from that side !
For me as others might have this problem
I had an old plugin inside the android.json
that I hadn't removed.
So I deleted the android.json
file and then did
phonegap run android
This will rebuild the plugins from what is in your config.xml
Then it worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With