I use Eclipse for develop android apps, but when run projects see this error:
Installation failed due to invalid APK file!
You need to create an emulator using the Android Virtual Device Manager. Then when you run it as an android application it will launch the emulator.
To do this: Go to settings > Apps > Package Installer > Click Clear Cache and Data. After restarting your phone and then check if the problem is fixed.
In my case this was caused by errors in a .jar file included my library. The .jar file was one I created and so I was able to fix it. Here is a breakdown of how the problem started and how I fixed it:
to fix it:
Having included all the files that were not part of the src folder caused a few duplicates in the project and .jar:
This caused the .apk to be invalid. Hope this helps someone. NOTE: this solution will only work if you have library files that you have changed and compiled yourself and have made the same mistake as I did when I included folders that were not needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With