-
Notifications
You must be signed in to change notification settings - Fork 0
Home
ios
Had to run this first:
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Then in Ionic project, this should work:
$ ionic cordova emulate ios
Android
(to check platform versions: $ cordova platform ls )
(in onpoint):
$ ionic cordova platform update android or $ ionic platform update android@6.2.3
$ ionic cordova build android
For fresh install of latest version of Android Studio (v2.2.3):
To avoid a range of Android SDK errors (e.g. gradle wrapper, license, versions, etc) when running $ ionic cordova emulate android, I did the following:
-
After standard install, open Anroid Studio —> * Configure menu —> SDK Manager —> Just to be safe, I installed both O and Nougat SDK Platforms.
-
Might also need to update JDK to 8.0, got dmg here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-
(this resolved gradle wrapper issue) apparently templates directory in
~/Library/Android/sdk/toolswas missing, so I downloaded the Android SDK tools package and just copied the entire templates directory from tools into the tools that was already installed at~/Library/Android/sdk/tools
https://androidsdkoffline.blogspot.com/p/android-sdk-tools.html
-
a JS error was happening emanating from
emulator.jsinonpoint/platforms/android/cordova/libon line 202 which I was able to silence by commenting out:var num = target.split('(API level ')[1].replace(')', '');
and replacing with:
var num = target.match(/\d+/)[0];
NOW, in order to run the emulator, you have to actually start a virtual device in Android Studio first:
- Create a project.
- Open project and click AVD Manager button inside project to open virtual device manager.
- Select or Add a virtual device manager and click on green arrow in Actions to start virtual device.
Next, back over to Ionic project:
$ ionic cordova emulate android
for removing current Android SDK install: