Skip to content

Could not find an emulator image to run your project #363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
EduardoAzul opened this issue Mar 21, 2015 · 17 comments
Closed

Could not find an emulator image to run your project #363

EduardoAzul opened this issue Mar 21, 2015 · 17 comments

Comments

@EduardoAzul
Copy link

Hey there,

i'm getting this error when i try to run with emulator tns run android --emulator, i'm using ionic and it runs all my apps in the emulator, it should work for nativescript either, anyone had this error before?

Thanks.

capturar

@flowforever
Copy link

I have met this issue, After I install the Android SDK everything goes well.

@rosen-vladimirov
Copy link
Contributor

Hi @EduardoAzul
Have you added platform-tools and tools directories from your Android SDK to your PATH environment variable? Also you can try starting your AVD Manager and see if there's an image which targets at least Android 4.2.2 (the minimum supported API Level is 17).
If all of these requirements are met, can you try

$ tns run android --emulator --log trace

and send us the output. It will be great if you can send the output of

$ adb version

@teobugslayer
Copy link
Contributor

Hello @EduardoAzul, are you using Google API images? For the beta release, we support only pure android images. Of course, we accept pull requests :)

@brianchirls
Copy link

I'm having the same problem. The android tools and platform-tools directories are both in my PATH. (The android sdk folder is under ~/Library/Android) I've got images for API 21, 19 and 17.

The output of adb version is:

Android Debug Bridge version 1.0.32

The output of tns run android --emulator --log trace is here:
https://gist.github.com/brianchirls/2b497a0561763030e774

@EduardoAzul
Copy link
Author

Hey guys, thanks for the support :)

@rosen-vladimirov I have the platform-tools and tools directories in path variable, and all API Levels after 17

The output of adb version is:

Android Debug Bridge version 1.0.32

And here is the output of the tns run android --emulator --log trace

https://gist.github.com/EduardoAzul/c480c5cb33cd10fa38fd

@teobugslayer

I dont't really know if i'm using Google API images, but i don't think so, i just installed android SDK and android studio. I can even use ionic which is out of the Android Studio and the emulator to run some apps.

Thanks!

@rosen-vladimirov
Copy link
Contributor

Hi @EduardoAzul , @brianchirls
Thanks for the information you've both shared. As @teobugslayer pointed, currently nativescript-cli can handle only native android images, when you do not select image on your own. Can you try
tns run android --emulator --avd <image name>
and replace <image name> with the name of one of your images listed when you start AVD Manager. Can you check if this works for you?

@EduardoAzul
Copy link
Author

@rosen-vladimirov Hell damn right!

tns run android --emulator --avd Nexus_5_API_21_x86

Thanks Guys! ^_^

capturar

@brianchirls
Copy link

It worked for me too. And after running it once specifying image, it works just fine without it and just defaults to that image. Strange.

Also, when I accidentally mis-type the image name, it does not seem to notice that the image name I gave it doesn't exist and hangs indefinitely.

@rosen-vladimirov
Copy link
Contributor

Hey guys, I'm happy the emulator is finally started.

@brianchirls
It is really strange that is started working without passing avd. Our code is checking some of the images configuration files and maybe after the first start, they were successfully created and the next time we are able to read the required information.
As per the incorrect image name, we have it in our backlog #289.
As the issue seems resolved I intend to close it by the end of the day. Please inform me in case you have any concerns.

@brianchirls
Copy link

Thanks, @rosen-vladimirov. My only concern is that this step should probably be added to the documentation if it can't be fixed, before the issue is closed.

@dkarlovi
Copy link

dkarlovi commented Jan 6, 2016

@brianchirls @rosen-vladimirov 👍 on adding this to documentation, had the same issue which got fixed by the same solution.

@latinbox
Copy link

latinbox commented Jun 8, 2016

thanks a lot for the solution @rosen-vladimirov i had the same issue as @EduardoAzul

@latinbox
Copy link

latinbox commented Jun 8, 2016

oh shit i got this one after putting tns run android --emulator --avd Nexus_5_API_21_x86:
Cannot run your app in the native emulator. Increase the timeout of the operation with the --timeout option or try to restart your adb server with 'adb kill-server' command. Alternatively, run the Android Virtual Device manager and increase the allocated RAM for the virtual device.

@yadinesh
Copy link

I am able to launch the emulator on Windows 7 using the command tns run android --emulator --avd Nexus_5_API_21_x86 but my app is not appearing on the emulator. Please suggest.

@ILHAMIDEAZ
Copy link

ILHAMIDEAZ commented Sep 22, 2016

Hi, I'm also facing the same issue -
My PATH :
C:\Program Files\Java\jdk1.8.0_102\bin;C:\Users\IlhamideaZ\AppData\Local\Android\android-sdk

tns run android --emulator --log trace
w1

adb version
w2

How can I solve it? Thanks!

@rosen-vladimirov

@ishandutta2007
Copy link

$ tns run android --emulator --log trace

execFile: /Users/ishandutta2007/Library/Android/sdk/platform-tools/adb "help"
execFile: /Users/ishandutta2007/Library/Android/sdk/platform-tools/adb "help"
Exec uname -a
stdout: Darwin MacBook-Pro 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

stderr:
Exec npm -v
stdout: 4.1.2

stderr:
spawn: java "-version"
Exec node-gyp -v
stdout:
stderr: /bin/sh: node-gyp: command not found

Exec xcodebuild -version
stdout: Xcode 8.2.1
Build version 8C1002

stderr:
Exec gem which xcodeproj
stdout: /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.4/lib/xcodeproj.rb

stderr:
Exec pod --version
stdout: 1.2.1

stderr:
Exec '/Users/ishandutta2007/Library/Android/sdk/platform-tools/adb' version
stdout: Android Debug Bridge version 1.0.39
Revision 5943271ace17-android

stderr:
spawn: /Users/ishandutta2007/Library/Android/sdk/emulator/emulator "-help"

$ adb version

Android Debug Bridge version 1.0.39
Revision 5943271ace17-android

@pkoleva
Copy link
Contributor

pkoleva commented Apr 20, 2017

Hey, @ILHAMIDEAZ @ishandutta2007 can you verify you have created emulator images with either tns devices android --available-devices (in case you are using our RC) or using android command-line emulator -list-avds .
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests