Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

I installed android studio and tried to run easy projects.

But I caught strange error message:

Waiting for device.
/usr/local/idea/android-studio/sdk/tools/emulator -avd Nexus-4-18-xhdpi -netspeed full -netdelay none

emulator: emulator window was out of view and was recentered

Device connected: emulator-5554
Device is online: emulator-5554
Target device: Nexus-4-18-xhdpi [emulator-5554]
Uploading file
    local path: /home/nazar/Documents/coursera-android/Examples/HelloAndroid/out/production/HelloAndroid/HelloAndroid.apk
    remote path: /data/local/tmp/course.examples.HelloWorld.HelloWorld
Installing course.examples.HelloWorld.HelloWorld
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/course.examples.HelloWorld.HelloWorld"
Error: Could not access the Package Manager.  Is the system running?

I couldn't figure out why this happen?

I installed sdk version and configured emulator. Any suggestions?

Here is emulator confiuration:

emulator confiuration

Update:

I tried to install Genymotion device and use few virtual devices, but caught:

Waiting for device.
Target device: genymotion-nexus_4___4_4_2___api_19___768x1280-192.168.56.101:5555
Uploading file
    local path: /home/nazar/Documents/coursera-android/Examples/HelloAndroid/out/production/HelloAndroid/HelloAndroid.apk
    remote path: /data/local/tmp/course.examples.HelloWorld.HelloWorld
Installing course.examples.HelloWorld.HelloWorld
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/course.examples.HelloWorld.HelloWorld"
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
Error: Could not access the Package Manager.  Is the system running?

How to solve this error?

like image 463
catch23 Avatar asked Feb 03 '14 11:02

catch23


1 Answers

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.

like image 133
Piyush Agarwal Avatar answered Sep 25 '22 20:09

Piyush Agarwal