Ionic 2 compiles Android

I made an example program for Ionic 2, and I want to compile it into android and try it on the phone. So according to the data, first add platform support in the project directory:

ionic platform add android

Well, it passes normally, so compile:

ionic build android

First prompt to set ANDROID_HOME, I didn't even install android, okay fq downloaded an android studio with sdk, and set the sdk path to ANDROID_HOME in the path.



 

Continue to compile:

ionic build android

The prompt cannot find the android version android-23, damn, the latest android studion comes with android-24, so the android sdk manager is installed, and the great wall is once again blocking the road of technological progress. So, set up the proxy:



 ok, now it's time to update.

 Update, continue to compile when finished

Ionic build android, finally compiled successfully.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326477333&siteId=291194637