Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android O Developer Preview emulator always OFFLINE

I'm trying to test my app against the Android O developer preview. I can download and run the emulator, but when deploying my app, it always comes up as "[OFFLINE]". If I go ahead and try to deploy anyway, I get the following output:

com.android.ddmlib.AdbCommandRejectedException: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
Error while Installing APK

I've tried restarting ADB as suggested in the output above. Also, I never get a confirmation dialog in the emulator. Emulators for other versions. eg. Nougat 7.1 work fine.

I'm running Android Studio 3.0 Canary 1 (the standard channel doesn't work either).

like image 744
Glenn Porter Avatar asked May 30 '17 10:05

Glenn Porter


People also ask

Can Android Emulator work offline?

Sure, you can use android emulator offline. Almost all the features are included in the emulator to be used offline. You'll just need to go online when you want internet connectivity in the Apps you are testing on your emulator.

How do I turn my emulator online?

1. just click on "About the emulator" -> "Build Number" about 5-7 times. 2. This will open "developers options", go back and click on it and enable "USB debugging" to bring it online.

How do I enable internet on Android Emulator?

Go to your Android\Sdk\emulator folder and open command prompt. Type emulator -list-avds to see available emulator names. Type emulator -avd name-of-your-device -netdelay none -netspeed full -dns-server 8.8. 8.8 command and press enter.


1 Answers

I've been searching for an answer to this issue, but finally worked it out for myself.

Emulators with "Play Store" enabled are the closest they've ever been to being a real device - including now having to enable Developer Options and then USB debugging to be able to deploy to it. If you don't do this, it shows as being an offline device with unknown capabilities.

https://developer.android.com/studio/debug/dev-options.html

Once the USB debugging option is enabled and the source device is approved, it all springs to life.

like image 143
Darren Taft Avatar answered Nov 07 '22 10:11

Darren Taft