Error: Could not access the Package Manager. Is the system running? - At Android Studio

家住魔仙堡 提交于 2019-11-27 20:34:08

First make sure you are running Android Studio version above 0.3.2 because there was some issue reported regarding the same in AS 0.3.2 . If it is not you can update it from Help >Check for update.

If you are already running AS above 0.3.2 :

Seems like issue is with your emulator not with Android Studio. It may happen that you are trying to install application before even the emulator started properly.

Wait till the home screen appears in the emulator before trying to install any application.

Also try to install any apk in Emulator from command line

Steps to install

  • Go to $Android_SDK_DIR\platform-tools, right click there keeping shift key pressed and Chose "Open Command Window here".
  • Run command adb devices to make sure yout emulator is running properly. It will show all your running emulators.
  • Now if emulators are showing properly, type the command adb install YOUR_FULL_APK_PATH , YOUR_FULL_APK_PATH is of any .apk file path in your system.

Please update if this works fine.

Abhishek2k6

The most common cause of this error is simple: You have to manually unlock your Android Virtual Device by swiping the “lock” icon on the screen. Security measures prevent the emulator from letting you connect the debugger before doing this.

The problem is resolved:

In Android Studio

  1. Start run/debug
  2. if you see the message
  3. Do not closed the AVD, just click on run/debug again, the Application will be running when you unlock the application.

The same problem but different solution, I modified my Virtual Device, I changed Memory option and Internal Storage, and it works fine. RAM:512 , VM HEap: 192, Internal Storage=200, SD Card Size: 200 for Device Nexus 4 android 4.2.2.

In my case this error was caused by SELinux. I got to set SELinux to permissive.

adb shell su 0 setenforce 0

I had this issue, but I found that simply killing the emulator and restarting it worked. There seems to be some sort of race condition where the emulator has not initialized before Android Studio tries to launch the apk and so you get the package error.

Mahdi

I had this too, and using this config worked for me :

Device: Nexus One
Target: Android 4.2.2 -api level 17
CPU/ABI: ARM (armeabi-v7a)
Keyboard: Hardware keyboard present

Memory Options:

RAM: 512
VM Heap: 192
Iternal Storage: 200

SD Card:

Size:200

This Is Worked for me

1)Close Solution.

2)Close Emulator.

3)Run Emulator and Wait till it launch completely and shows Home Screen.

4)After that only Open Solution And Clean,Rebuild and Try to deploy Application.

The same happened to me right now. I don't know if there is another but for me the following worked:

  • Opened AVD (Android Virtual Device) Manager
  • Started virtual device
  • Hit the Run button again (that one at status bar)

Explanation: The problem happened because of timeout. Once device had started, the Android Studio could comunicate with him. (v 0.5.3)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!