问题描述
我安装Android的工作室,并试图逃跑容易的项目。
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?
我安装的SDK版本和配置仿真器。有什么建议?
I installed sdk version and configured emulator. Any suggestions?
下面是模拟器confiuration:
Here is emulator confiuration:
更新:
我试图安装Genymotion设备,并使用一些虚拟设备,但抓住了:
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?
如何解决这个问题?
推荐答案
首先确保你正在运行上面的Android 0.3.2版本的工作室由于存在一些问题,报告了有关同在AS 0.3.2。如果不是,你可以从更新帮助>检查更新
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
.
如果你已经按上述0.3.2运行:
If you are already running AS above 0.3.2 :
好像问题是与你的模拟器无法与Android的工作室。它可能发生,你要安装应用程序之前,甚至在仿真器正常启动。
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.
也可以尝试从命令行安装任何APK在模拟器
Also try to install any apk in Emulator from command line
步骤安装
- 转到$ Android_SDK_DIR \平台工具,右键单击有保留shift键pressed并选择打开命令窗口在这里。
- 运行命令
ADB设备
,以确保YOUT模拟器运行正常。它会显示所有正在运行的仿真器。 - 现在,如果仿真器都显示正常,键入命令
ADB安装YOUR_FULL_APK_PATH
,YOUR_FULL_APK_PATH在任何的.apk文件路径您的系统。
- Go to $Android_SDK_DIR\platform-tools, right click there keepingshift key pressed and Chose "Open Command Window here".
- Run command
adb devices
to make sure yout emulator is runningproperly. It will show all your running emulators. - Now if emulators are showing properly, type the command
adb installYOUR_FULL_APK_PATH
, YOUR_FULL_APK_PATH is of any .apk file path inyour system.
请更新,如果这工作得很好。
Please update if this works fine.
这篇关于错误:无法访问软件包管理器。在系统运行? - 在机器人工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!