Build for Android and iOS platform doesn't work
Opened this issue · 5 comments
Hello,
I was wondering if is it possible to build the project for both platform?
When I try to build for android after ios, it throws an error
Error thrown while running shell command: "cordova build android"
Error: Command failed: /bin/sh -c cordova build android
The provided path "/Users/Me/Projects/mobile/0.1.0/cordova/platforms/android" is not an Android project.
Thanks
Hi @alexismangin
Can you post the steps to me reproduce the bug?
I have this problem as well. I am on Linux Ubuntu 14.04, so since I cannot build for iOS it would be really nice if the Android stuff worked :-)
I followed the instructions in the 'getting started' guide (https://github.com/poetic/ember-cli-cordova/blob/master/docs/getting-started.md), but when it says to run the generate command and add --platform android afterwards, it doesn't work:
$ ember generate cordova-init com.poeticsystems.hello --platform=android
The above gives error: "The option '--platform' is not registered with the generate command. Run ember generate --help
for a list of supported options."
So, naturally, when I later try to run:
$ ember cordova:build --platform android
it says that cordova/platforms/android is not an Android project, because in the platforms folder there is nothing but a folder named 'ios' and a file named 'platforms.json' which only refers to ios as well.
This project looks really promising, and I would love to get it up and running on Android very soon so that my company can use it in our upcoming product!
Hi @alexismangin!
Thanks a lot, that worked 👍
:-)
@alexismangin and @Mitchal Here we use a cordova-init.sh to bootstrap the cordova directory, the script add platforms and plugins we are using, so we can put the cordova
directory to gitignore.
I could not reproduce the error doing the steps @Mitchal, but I see this error sometimes. The @alexismangin's suggest work fine