3

When I startup my android emulator to test my application, I run into an problem.

I get 2 windows that open up at the bottom of android studio one is AVD:Nexus_5_API_23 the other one is app.

In the AVD:Nexus_5_API_23 window it shows:

/Volumes/seagate/tools/emulator -netdelay none -netspeed full -avd Nexus_5_API_23
HAXM is working and emulator runs in fast virt mode
emulator: emulator window was out of view and was recentered
emulator: UpdateChecker: skipped version check

And the app window shows:

Device connected: emulator-5554

I'm not for sure what's going on.

I have created other emulators but I run into the same issue every-time.

My android studio is up-to-date. And just to to test that it's not some of my codes fault. I created a new project with just the sample code, and still, it doesn't run.

wut
  • 31
  • 1
  • 3

3 Answers3

5

Just in case anyone finds this. I had a similar problem: When starting the AVD in AndroidStudio via run app the virtual device starts without a problem but the app doesnt get installed, without any message.

Solution

Go to run -> edit configuration -> app -> miscellaneous and untick Skip installation if APK has not changed. This solved it for me.

Cheers!

tarexo
  • 51
  • 1
  • 2
  • Seems like a big bug, surprised this is still there in the latest android studio! If you install a new virtual device it still won't install since the APK hasn't changed... – Kevin Feb 15 '22 at 18:38
0

When you run the app, you should see an install command run in you app window. Something to the effect of

Device is ready: Nexus_5_API_23_x86 [emulator-5554]
Target device: Nexus_5_API_23_x86 [emulator-5554]
Installing APK:  /home/username/Documents/Programming/Java/Sample/app/build/outputs/apk/app-debug.apk
Uploading file to: /data/local/tmp/www.domain.com.sample
Installing www.domain.com.sample
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/www.domain.com.sample"
pkg: /data/local/tmp/www.domain.com.sample
Success

If you don't see this, odds are Android Studio is not running the install command.

This command should run your app. Try pulling up the terminal in Android Studio and running the install command.

adb -s emulator-5554 install ./app/build/outputs/apk/apk-debug.apk

Source

You may have to install something for the adb command to work. That should install it on your device. If that installs it, something is wrong with your run configurations or manifest file. Go to Run -> Edit configurations... and make sure the deploy is "Default APK" and launch is "Default Activity". If both these are there and it is still not working, check your manifest.

Rhuarc13
  • 135
  • 1
  • 9
  • 1
    The emulator starts up and I can see the screen. I can navigate through the emulator, but my app is not installed... or starting up. – wut Jan 17 '16 at 09:15
0

Go to run -> Edit Configurations -> and set deploy to "Default APK" and set launch to "Default Activity". Then add this block of code inside your AndroidManifest.xml -- manifest folder, and inside its Activity tag:

<intent-filter>
     <action android:name="android.intent.action.MAIN" />
     <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

and then re-run the your android application.

peaky
  • 1
  • 1