找不到APK Android中 [英] could not find apk in android

查看:198
本文介绍了找不到APK Android中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的春季和日食Maven插件,但是当我要运行这个项目将返回找不到ShopZilla.apk?这将如何解决,请给我建议。

I am using spring and maven plugins in eclipse but when i want to run this project it returns Could not find ShopZilla.apk? How this will resolved, Please suggest me.

推荐答案

如果你已经得到了所有必需的插件安装(ADT,M2E和M2E安卓),将APK应自动IDE生成。

If you have got all required plugins installed (ADT, M2E and M2E Android), the apk should be automatically generated by IDE.

有时候则不会生成APK文件,只是因为有你的项目的一些Android编译错误,遗憾的是,这些都没有让他们没有在Eclipse问题视图中显示编译错误。例如,如果您将一个icon.jpg文件在您的RES /绘制文件夹,将扩展名更改为PNG,你没有编译错误的问题查看,但如果你再手工删除该apk文件在您的项目输出文件夹,将APK文件将不会再次发生,在这种情况下Eclipse中只给出了非常普通的消息,能找到*没有的.apk文件,在控制台视图,当你试图在模拟器上运行它。

Sometimes the apk file is not generated simply because there are some android build error in your project, unfortunately, these are not compile error so they are not shown in Eclipse problems view. For example, if you attach a icon.jpg file in your res/drawable folder and change the extension to png, you get no compile error in problems view, but if you then manually delete the apk file in your project output folder, the apk file will not be generated again and in this situation Eclipse only gives very generic message "could not find *.apk file" in console view, when you trying to run it on emulator.

现在唯一的问题是,我们如何才能知道是否有Android编译错误。右键点击你的项目,选择Android的工具 - >修复项目属性。在我的JPG / PNG例如,Eclipse会显示libpng的错误:不是PNG文件,错误:未能处理PNG图像C:\ Android的沙箱\来源\ yourproj \水库\绘制,MDPI \ icon.png在和项目标记为在Package Explorer视图一个错误。只要你有一个真正的PNG文件,宾果替换icon.jpg,APK自动生成。虽然我不知道这是否可以检测到所有微妙的Andr​​oid编译错误。

Now the only question is how can we tell if there are android build error. right click your project, choose Android Tools -> Fix Project Properties. in my jpg/png example, Eclipse will show "libpng error: Not a PNG file, ERROR: Failure processing PNG image C:\android-sandbox\source\yourproj\res\drawable-mdpi\icon.png" and project marked as a error in package explorer view. as soon as you replace icon.jpg with a real png file, bingo, apk automatically generated. Though I am not sure if this can detect all subtile android build error.

这篇关于找不到APK Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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