User Learning
User Learning

Reputation: 3503

adb connection not available, or was terminated - Android

First I have updated to Marshmallow and then Created AVD with Google API. Once created it shows as

enter image description here

enter image description here

then after deletion when i run project

enter image description here

then my error getting

When i Run the APP (Shift+F10)

It shows the error as

at App tab :-

adb connection not available, or was terminated.

enter image description here

At emulator tab:-

D:\ADTSDK\adt-bundle-windows-x86_64-20140702\sdk\tools\emulator.exe -netdelay none -netspeed full -avd Nexus_One_API_23
emulator: WARNING: Increasing RAM size to 1GB
qemu: could not open disk image C:\Users\xxx\.android\avd\Nexus_One_API_23.avd/sdcard.img: Operation not permitted

enter image description here

I m unable to test my project with emulator and have searched on SO

I tried this also :

at cmd prompt :

adb kill-server & then 
adb start-server 

Any solution to work with Android emulator surely appreciated.

Upvotes: 3

Views: 3740

Answers (1)

kit
kit

Reputation: 445

Setting the android:targetSdkVersion to 23 did the trick for me. I was launching Android N preview (API23, same as Marshmallow), had the same error (adb connection not available, or was terminated).

Sometimes, I still get the error (e.g. if I opened Android Studio just now).
I open the Android Monitor tab android monitor tab, wait for logs from the emulator to start appearing, and rerun my app

Upvotes: 2

Related Questions