I\'m trying to run my first Ionic app but i\'m getting this error where it does not find my phone and does not find the emulator to run either.
C:\\Users\\MA
I had the same problem and none of the answers here solved my issue, I think the reason in my case was either Ionic framework or and most probably Native Script framework. Native Script uses the Android Studio emulator to link to their mobile apps so they change the Andriod Studio emulator's path. What I did to solve the issue:
1.Unistall Ionic, Cordova, and Native Script - I'm not sure if this step is necessary
2- Uninstall Android Studio and deleting the folder Android in AppData/Local folder
3- Install Andriod Studio and make sure not to import settings
1- Unistall Ionic, Cordova, and Native Script I'm not sure if this step is necessary
For Window system
npm uninstall -g ionic
npm uninstall -g cordova
npm uninstall -g nativescript
2- Uninstall Android Studio
3- Reinstall Android Studio
After that you might want to install the frameworks again, I did not
For me, the issue was a wrong ANDROID_HOME
environment variable on mac, I had to use the homebrew version. Added this to the .zshrc
:
export ANDROID_HOME=$(brew --prefix)/share/android-sdk
AVD cant find SDK root, possibly because they are in a different directory.Set your environment variables as shown in below screenshot:
First try this: If you are using a device. then just ensure that the device is well-connected. Check in the android studio that, the device is online. This error pops up usually when the device is offline.
If it does not work, https://stackoverflow.com/a/39711435/6747251
I got this error when trying to run it on a Kindle Fire. Enable ADB on the Kindle Fire and via your project: https://developer.amazon.com/docs/fire-tablets/connecting-adb-to-device.html#install-the-usb-driver-windows-users
I used VS code and the built in terminal running the command: ionic cordova run android
I have same issue when I run my ionic 2 app on windows (ionic run android), and I solve it by following these steps, hope it will help you.
1- Start your Android Studio.
2- Create a New Project to be able to create or delete virtual devices.
3- Delete any virtual devices if found.
4- and create virtual device via AVD manager as shown below .