开发者

could not find apk in android

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


Make sure after updating your android sdk sdk build tools are updated properly. You can check it by Open sdk manager -"Android Sdk Build Tools" status must be installed. if the status is not installed then install Android Sdk Build Tools for the same.


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

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.

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.


If you are using the ADT plugins greater than ADT17 then rename your "lib" folder to "libs". Then Right click on project => Android tools => Fix project Properties => Clean your project

If still issue then just restart your eclipse. Your issue will be gone.


Please follow these steps; this might help you out:

Go to Project->Properties

Select Android from left-hand side list

Uncheck the "Is Library" checkbox

or

projects ->  clean
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜