Error while selecting emulator in Android Studio

2

Good afternoon. I'm starting to study Android and use Android Studio. I clicked to run the application and the window appeared asking for a new emulator.

I've done this before on another computer and it worked normally after the settings, as in the following image.

Butnow,whenIclickFinish,itloads:

And after a while it returns to the start screen, requesting an emulator again. Am I doing something wrong, or is any setting wrong?

    
asked by anonymous 23.06.2016 / 18:12

2 answers

2

You can start your vm in two ways, the first one is through the standard mode by running your application Shift + F10 command and the other way is through AVD Manager.

Problem Resolution:

I've already experienced this problem, possible delay in ADB synchronization :

After creating your vm, if no virtual machine appears, do not worry, close this window, then restart your Shift + F10 application and wait a while until Android lists your vms, then choose the machine you want to start and start by clicking ok.

  

Obs: In% with% uncheck Select Deployment Target , since if this   option is checked and if you created a vm with some error,   every time you run your application you will get an error and never start anything.

Recommendation to create your VM:

I noticed that you are using a very high resolution 1080x1920 down to 480x800 or 320x480 and I also noticed that you are using API 23 (6.0) Try to download your API to API 21 (5.0) or API 19 (4.4)

Creating a Basic VM:

On the menu toolbar click AVD Manager and then ...

click [+ Create Virtual Device ...]

Window - Select Hardware

Category    Name              Size    Resolution    Density 
Phone       3.2"QVGA(ADP2)    3,2"    320x480       mdpi

click [Next]

Window - System image

choose the [Other images] tab

Release Name    API Level    ABI            Target
Kit Kat         19           armeabi-v7a    Android 4.4(With Google APIs)
  

Note: If you do not have the image above download it (Install and click Finish) or select another img, it's up to you ...

Then click [Next]

Window - Android Virtual Device - Verify Configuration

(!) AVD Name 3.2" QVGA (ADP2) API 19 <- mude para -> 3.2 QVGA (ADP2) API 19

Emulated        Graphics:     Software GLES 2.0
Performance
  • Now click [Finish]
  • Wait while your virtual machine is created ...
  • Then select your new VM and start it to test ...
  

Important Notice: If you have created this new VM with the above settings, please note that you need to add%   the API 19 (4.4) to its []Use same selection for future launches , in this way:

 defaultConfig {
        applicationId "package de seu app"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

Some links that may help with environment variables:

See also: How to increase the memory of the Android Studio IDE?

I hope I have helped.

    
23.06.2016 / 20:23
1

Maybe the project you're trying to run does not support the version of the API set up on AVD . Try to check on your build.gradle if the targetSDK and minimumSdk is less than or equal to your emulator version.

Also uncheck the Tools > Android > Enable ADB Integration .

Maybe this also helps: Android studio: emulator is running but not showing up in Run App "choose a running device" .

    
23.06.2016 / 20:01