“EOCD not found” with adb install

2019-03-02 19:21发布

When an Android project exceeds about 2MB, I keep getting "EOCD not found, not zip" when trying to install the signed application on a device using adb install. This problem is limited to Windows (Windows XP) because I found no problem installing the same application on a fresh Ubuntu box.

I could reproduce the problem with the HelloWorld application: adb will fail as soon as I add files to exceed 2MB (I generate a 2.7 MB apk file) in the assets folder.

I am almost sure such problem didn't occur in June; unfortunately it seems I can't get back to May/June situation.

Any ideas?

1条回答
走好不送
2楼-- · 2019-03-02 19:53

This problem does not seem to be related to size IMO. As in my current project, the APK has size more than 9 MB. I had a similar problem and was getting almost similar logs as below in eclipse console

[2011-12-06 10:35:38 - MyProject] Failed to install MyProject.apk on device 
[2011-12-06 10:35:38 - MyProject] (null)
[2011-12-06 10:35:38 - MyProject] Launch canceled!

and on window's command console I was getting EOCD not found, not Zip message while installing the same APK (build using eclipse). But cleaning and rebuilding the project solved the problem.

In my case, I had had deleted some back up (non-java) files from src directory, which eclipse did not know.

查看更多
登录 后发表回答