Issue
I have an AVD that I created in Android Studio, here are the details of it:
When I run ionic cordova emulate android
in my ionic project, I get this error:
ANDROID_HOME=/Users/joshterrill/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home
Error: No emulator images (avds) found.
1. Download desired System Image by running: /Users/joshterrill/Library/Android/sdk/tools/android sdk
2. Create an AVD by running: /Users/joshterrill/Library/Android/sdk/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
[ERROR] An error occurred while running cordova emulate android (exit code 1).
When I run this command: ~/Library/Android/sdk/tools/android list avd
I get this:
Joshs-MacBook-Pro:~ joshterrill$ ~/Library/Android/sdk/tools/android list avd
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Running /Users/joshterrill/Library/Android/sdk/tools/bin/avdmanager list avd
Available Android Virtual Devices:
Joshs-MacBook-Pro:~ joshterrill$
So it doesn't show that I have any there.
Also, here's a screenshot of Android Studio which shows that my SDK is currently installed in the same place that I'm looking for the AVD:
Any ideas on why the AVD isn't showing up? I understand that the first error shown from the emulate command gives me the ability to create an AVD from the command line, but I'm going to need to create various AVD's from Android Studio and need to figure out why the terminal doesn't see them.
Solution
The answer to this problem was having the correct information in my $PATH
. Here's what ended up working for me:
export ANDROID_HOME=~/Library/Android/sdk
export PATH=${PATH}:/Users/mylaptop/Library/Android/sdk/platform-tools/adb:/Users/mylaptop/Library/Android/sdk/platform-tools:/Users/mylaptop/Library/Android/sdk/tools
Answered By - Joshua Terrill
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.