Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for Android and iOS platform doesn't work #173

Open
alexmngn opened this issue Oct 6, 2015 · 5 comments
Open

Build for Android and iOS platform doesn't work #173

alexmngn opened this issue Oct 6, 2015 · 5 comments

Comments

@alexmngn
Copy link
Contributor

alexmngn commented Oct 6, 2015

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

@alexmngn alexmngn changed the title Android and iOS platform at the same time Build for Android and iOS platform doesn't work Oct 6, 2015
@dukex
Copy link
Contributor

dukex commented Oct 13, 2015

Hi @alexismangin

Can you post the steps to me reproduce the bug?

@Mitchal
Copy link

Mitchal commented Oct 19, 2015

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!

@alexmngn
Copy link
Contributor Author

Hi @dukex and @Mitchal
I found a way to generate the other platform directly going into the cordova folder and running the command cordova platform add android. It worked fine that way, but didn't work using the blueprint.

@Mitchal
Copy link

Mitchal commented Oct 20, 2015

Hi @alexismangin!
Thanks a lot, that worked 👍
:-)

@dukex
Copy link
Contributor

dukex commented Oct 20, 2015

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants