Hari Krishnan
Hari Krishnan

Reputation: 6302

Error in Building android app in ionic

I am fresh in ionic and trying to build a new app by following their official documentation. It is all working fine till adding the android platform. But when i tries to build it like

$ ionic build android

It says

The provided path "/home/user/myApp/platforms/android" is not an Android project.

myApp is the demo 'tab app' from ioic which is downloaded by

$ ionic start myApp tabs

How should i solve this?

Upvotes: 1

Views: 2032

Answers (3)

Huanhuan
Huanhuan

Reputation: 11

I also met the problem, I do these steps to solve it:

  1. Ionic platform rm Android

  2. Go to the project folder, and delete the platforms directory, this is the key point.

  3. Ionic platform add Android

  4. Ionic build Android

Upvotes: 1

Mikel Sanchez
Mikel Sanchez

Reputation: 2890

you have to add the platform first to the project:

ionic platform add android

after, you have to check if you have a new folder created at:

yourProject/platforms/android.

If you want for ios, this is the command:

ionic platform add ios

Upvotes: 3

NamNH
NamNH

Reputation: 1805

Make sure you are staying at folder "/home/user/myApp" when add android platform

$ cd myApp
$ ionic platform add android

Upvotes: 0

Related Questions