[android] could not access the package manager. is the system running while installing android application

While installing the android application in the emulator I am getting the following error.

Please help me to resolve this error.

Error message:

emulator.exe -avd avd_name

adb wait-for-device    

adb install path-to.apk    

could not access the package manager. is the system running while installing android application....

This question is related to android android-emulator runtime-error

The answer is


Once you see this error, wait for emulator to show lock screen. And then relaunch the app in your IDE and check the emulator again. It works for me always.

In Android studio, you can relaunch by clicking the green play button or ctrl + r.


Facing Same issues following Link helped solving the problem. The above solutions were not helpful for me. deployment-failed-could-not-access-the-package-manager-is-the-system-running

By restarting server using CMD application was back to work. Open cmd (Run as administrator), open this

cd C:\Program Files (x86)\Android\android-sdk\platform-tools

(this path must specify your android-sdk installation folder )

Now, first write, adb kill-server and then adb start-server.


In my case it was just that the emulator took 9 minutes to start. Wait until you see the lock icon on the emulator LCD. Or use actual tablet or phone.


If this error is gotten when using a rooted device's su prompt and not from emulator, disable SELinux first

setenforce 0

You may need to switch to shell user first for some pm operations

su shell

then re-run your pm command.

Same applies to am commands unavailable from su prompt.


Check your project build is in Debug mode not Release, I had some problem for debugging always I forget to change Release mode to Debug (Xamarin Users)


You can avoid the error by setting default device before launching application. Launch the AVD before starting the app.


As other have said, this error occurs because the emulator is still in the process of launching. An attempt to access the package manager, for the device, at this time causes an error.

It's just a simple timing issue. Here are the steps to avoid this error:

  1. Wait until the emulator 'lock screen' is showing.
  2. Run the 'app' again (^R in most IDE's).
  3. Choose the running device (Should be the same emulator).

App should install without error.


Kill the process/server and restart it.! It worked.


The solution for me was to restart the IDE. I suspect that a slow emulator was hiding from view, blocking installation on my device.


Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to android-emulator

flutter run: No connected devices How to remove the Flutter debug banner? Android Studio AVD - Emulator: Process finished with exit code 1 Android Studio Emulator and "Process finished with exit code 0" Run react-native on android emulator ERROR Android emulator gets killed Error while waiting for device: Time out after 300seconds waiting for emulator to come online Unfortunately Launcher3 has stopped working error in android studio? updating Google play services in Emulator Android Studio emulator does not come with Play Store for API 23

Examples related to runtime-error

ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'undefined' what does Error "Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)" mean? javac: invalid target release: 1.8 C++ error : terminate called after throwing an instance of 'std::bad_alloc' Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException Error No Main class found in NetBeans Runtime error: Could not load file or assembly 'System.Web.WebPages.Razor, Version=3.0.0.0 TypeError: Cannot read property "0" from undefined Array Index Out of Bounds Exception (Java) Excel VBA Automation Error: The object invoked has disconnected from its clients