invalid APK file

旧时模样 提交于 2019-12-23 19:12:52

问题


Hi i am new to android dev.

getting error ..

[2011-01-17 11:15:48 - TriviaGK] Installation failed due to invalid APK file!
[2011-01-17 11:15:48 - TriviaGK] Please check logcat output for more details.
[2011-01-17 11:15:48 - TriviaGK] Launch canceled!

plz tell where is logcat stored and how to debug this.

Also another app is running successfully in same enviroment.

Please Help android geeks.


回答1:


I know this question was asked in January, but, did you try cleaning the build? I just got this issue and solved it by going to Project --> Clean... and then running that. It'll delete your APK's and then when you run they'll be rebuilt. Worked for me!




回答2:


In Eclipse, go to Window->Open Perspective->Other and you should see DDMS as an option. If you choose this perspective LogCat is shown by default along with some other debug tools. If it does not show up, you can find it under Window->Show View->Other->Android->LogCat.




回答3:


Check the default.properties file to see if the target-sdk (which version of android you want the app to be targeted to) and be sure that you actually got the sdk for that version of Android.

If you don't, either download the right SDK or change the target sdk in default properties.




回答4:


For me the problem appeared to be that I made archive of the "www" folder - tar.gz one, for backup - on the same place where the "www" folder itself is - inside the "assets" folder. And that archive was causing the error. All other projects were launching fine. And when I deleted this archive - the error was gone.

PS: when I made .zip archive of the "www" folder - and the project could run fine with no problems :D ... haha :D ...




回答5:


Small chance that you have the same problem, but still: After viewing the Logcat output I noticed that your Android project should not contain (or at least not start with) an underscore (_).

edit: As I see now, the console log you posted has your project name in it, and does not contain any underscores. So this answer won't solve your problem, but might still be usefull to others.




回答6:


Zip aligning a file can also cause this issue. If you are having it, try uploading the signed APK file (prior to zipalign) to your device and see if the problem persists. If the problem hets fixed, then ZIPALIGNING it is not working properly.



来源:https://stackoverflow.com/questions/4710363/invalid-apk-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!