找不到EOCD,不是Zip-尝试通过cmd提示符在设备中安装apk时 [英] EOCD not found, not Zip - when trying to install apk in device through cmd prompt

查看:782
本文介绍了找不到EOCD,不是Zip-尝试通过cmd提示符在设备中安装apk时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Android创建我的第一个地图应用程序,并且按照这篇来自vogella的文章,我的案子没有成功。我遇到了您的设备不支持Google Play服务问题。



然后,我遇到了以下发布,建议手动上传一些apk在模拟器中进行操作。在发布该帖子之前,我一直成功到步骤2,但在建议安装 com.google.android.apps.maps-1.apk com.google.android.gms的步骤3中失败-2.apk 使用adb命令。



我在命令提示符下遇到了以下问题



<找不到pre> EOCD,而不是Zip
文件'D:\Program Files\Android\android-sdk-windows\apks\com.google.android。 apps.maps-1.apk'
不是有效的zip文件
rm对于/data/local/tmp/com.google.android.apps.maps-1.apk失败,没有这样的文件或目录

我引用了,但那些也没有帮助。



更新:



我碰到的一篇帖子建议给自己发送电子邮件,并在模拟器中打开电子邮件帐户,然后下载文件并然后从那里安装。我遵循了这些步骤,并成功地在模拟器中包含了这些apk文件,但是在安装它们时遇到了问题。以下是我在对话框中收到的异常


解析软件包时出现问题。


我相信问题可能是因为文件损坏了吗?我已更新了最新的SKD。可以在此屏幕截图

解决方案

我也遇到了同样的问题,结果只是实际的apk文件已损坏。您应该可以使用zip文件管理器在计算机上打开APK,如果无法打开,则可能文件已损坏。



尝试再次下载一个新的APK也许来自其他来源,并在传输前检查是否可以将其作为zip文件打开。


I'm creating my first map application for Android and have followed every steps as recommended in this article from vogella and I'm unsuccessful in my case. I was facing the Google Play services is not supported by your device issue.

Then I came across the following post that suggests manually uploading few apks in the emulator to get going with the maps. I was successful till step 2 in following that post but failed in step 3 that recommends to install com.google.android.apps.maps-1.apk and com.google.android.gms-2.apk using the adb command.

I got the following issue in the command prompt

EOCD not found, not Zip
file 'D:\Program Files\Android\android-sdk-windows\apks\com.google.android.apps.maps-1.apk'
is not a valid zip file
rm failed for /data/local/tmp/com.google.android.apps.maps-1.apk, No such file or directory

I referred this, this and this but those didn't help either.

Update:

One of post that I came across recommended to email ourselves and open the email account in the emulator and download the files and then install from there. I followed the steps and was successful in having those apk files in the emulator but I faced issue when installing those. The following is the exception i received in the dialog

There is a problem parsing the package.

I believe the issue could be because of corrupted file? I have the latest SKDs updated. The emulator configuration can be seen in this screenshot

解决方案

I had this same problem and it turned out just to be that the actual apk file was corrupt. You should be able to open the APK on your machine using a zip file manager, if you cannot then it maybe that the file is corrupt.

Try downloading a new one again maybe from a different source and check that you can open it as a zip file before transferring.

这篇关于找不到EOCD,不是Zip-尝试通过cmd提示符在设备中安装apk时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆