简体   繁体   中英

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?

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

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

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

$ cd myApp
$ ionic platform add android

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM