亚行未能.apk文件复制到Android模拟器:没有这样的文件或目录 [英] failure of adb to copy .apk file to the Android Emulator: no such file or directory
问题描述
我打了障碍地让MyFirstApp(世界您好)Android应用程序在模拟器中运行。
I'm hitting a snag in getting the MyFirstApp (Hello World) Android app to work in the emulator.
我下面的说明操作:
http://developer.android.com/training/basics/ firstapp /磨合app.html
Windows7-64 / Eclipse的
Windows7-64 / Eclipse
该应用程序通过USB威胁我的电话。
The app works via USB to my phone.
步骤:
-
确认我的PATH环境变量包括了Android SDK。 OK。
Make sure my PATH environment variable includes the Android SDK. OK.
启动C:/用户/(我)/AppData/Local/Androd/android-sdk/platform-tools/adb.exe。 OK。
Launch C:/Users/(me)/AppData/Local/Androd/android-sdk/platform-tools/adb.exe. OK.
开始从Eclipse中的模拟器。好了,说到了。
Start the emulator from Eclipse. OK, it comes up.
验证MyFirstApp.apk是在Eclipse工作空间present MyFirstApp / bin目录。
Verify that MyFirstApp.apk is present in the Eclipse workspace MyFirstApp/bin directory.
从Eclipse运行MyFirstApp应用。
Run the MyFirstApp application from Eclipse.
Eclipse控制台打印出来:
The Eclipse console prints out:
[2012年12月1日23时02分15秒 - MyFirstApp]!Android的启动
[2012-12-01 23:02:15 - MyFirstApp] Android Launch!
[2012年12月1日23时02分15秒 - MyFirstApp]亚洲开发银行运行正常。
[2012-12-01 23:02:15 - MyFirstApp] adb is running normally.
[2012年12月1日23时02分15秒 - MyFirstApp]执行com.example.myfirstapp.MainActivity活动启动
[2012-12-01 23:02:15 - MyFirstApp] Performing com.example.myfirstapp.MainActivity activity launch
[2012年12月1日23时02分15秒 - MyFirstApp]自动目标模式:使用现有的模拟器
模拟器-5554'运行兼容AVDGalaxy_Captivate_2.2
[2012-12-01 23:02:15 - MyFirstApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'Galaxy_Captivate_2.2'
[2012年12月1日23时02分15秒 - MyFirstApp]上传MyFirstApp.apk到设备'模拟器-5554
[2012-12-01 23:02:15 - MyFirstApp] Uploading MyFirstApp.apk onto device 'emulator-5554'
[2012年12月1日23时02分17秒 - MyFirstApp]未能设备'模拟器-5554安装MyFirstApp.apk:没有这样的文件或目录[!!红色(错误)!]
[2012-12-01 23:02:17 - MyFirstApp] Failed to install MyFirstApp.apk on device 'emulator-5554': No such file or directory [!! RED (error) !!]
[2012年12月1日23时02分17秒 - MyFirstApp] com.android.ddmlib.SyncException:没有这样的文件或目录[!!红色(错误)!]
[2012-12-01 23:02:17 - MyFirstApp] com.android.ddmlib.SyncException: No such file or directory [!! RED (error) !!]
[2012年12月1日23时02分17秒 - MyFirstApp]启动取消! [!!红色(错误)!]
[2012-12-01 23:02:17 - MyFirstApp] Launch canceled! [!! RED (error) !!]
我试着从ADB命令行安装:
I tried adb install from a command line:
ADB安装MyFirstApp.apk
adb install MyFirstApp.apk
和获得
无法复制MyFirstApp.apk'到'/data/local/tmp/MyFirstApp.apk:没有这样的文件或目录
failed to copy 'MyFirstApp.apk' to '/data/local/tmp/MyFirstApp.apk': No such file or directory
RM失败/data/local/tmp/MyFirstApp.apk,没有这样的文件或目录
rm failed for /data/local/tmp/MyFirstApp.apk, No such file or directory
我还没有看到这个问题的搜索小时后报道其他地方。
I have not seen this problem reported anywhere else after hours of searching.
如果我运行
亚行外壳
我可以看到/ data目录。它显示为空,但权限
drwxrwx - x,它将占我不能够看到任何内容
I can see the /data directory. It appears empty but the permissions are drwxrwx--x, which would account for my not being able to see any contents.
因此看来,由于某种原因,.apk文件不获取复制到仿真器。
So it seems that for some reason the .apk file is not getting copied to the emulator.
还有一件事可疑:如果我运行
One other suspicious thing: If I run
亚行logcat
那么这个打印出的投诉列表,包括
then this prints out a list of complaints including,
E / dalvikvm(3520):无法打开DEX缓存/data/dalvik-cache/system@framework@core.jar@classes.dex:没有这样的文件或目录
E/dalvikvm( 3520): Can't open dex cache '/data/dalvik-cache/system@framework@core.jar@classes.dex': No such file or directory
...
W / dalvikvm(3620):JNI_CreateJavaVM失败。
W/dalvikvm( 3620): JNI_CreateJavaVM failed.
任何帮助将是非常美联社preciated。
Any help would be much appreciated.
Android SDK工具启21
Android SDK Tools Rev 21
Android SDK中平台的工具,启16
Android SDK Platform-tools Rev 16
的Android 2.2(API 8)
Android 2.2 (API 8)
SDK平台版本3
推荐答案
我也有同样的问题。
你可以试试:
首先,你可以APK包推到SD卡:
亚行推test.apk / SD卡/
然后,从SD卡安装APK:
亚行外壳安装时/sdcard/test.apk
then, install apk from sdcard: adb shell pm install /sdcard/test.apk
希望可以帮到您!
这篇关于亚行未能.apk文件复制到Android模拟器:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!