Android device cannot parse package - android

I know this question has been asked before but previous answers have not helped me solve my problem. From Eclipse, I've tried exporting the apk or simply copying the apk from the bin file, and sent it to myself via email. However, when I try to install it by opening the attachment, there is a "parse error." I'm not quite sure what the problem is. This has worked before so my device is probably up to date. The other reason would be that the apk would be corrupted, but I don't see how that's possible if I got it directly from Eclipse.

Possible Solutions:
Uninstall any other apps with the same package name
Check: Unknown Sources
Download the apk and open it with something other than your email client/browser such as: Easy Installer

Have you tried generating a unsigned APK? Sometimes Eclipse acts in strange ways and the apk in the bin folder doesn't work.
Try using right click on your project -> Android Tools -> Export Unsigned Application Package
Then select your destination folder.
If the problem persists, as Randy pointed out, uninstall any previous version of that app in your device.
Hope it helped.

Related

Unsigned Android apk file won't install

I created an unsigned APK file from my eclipse project to demo my app on another device. It runs fine on the emulator and on a connected phone.
When I emailed it and downloaded the apk file ( I have allow apps from unknown locations ticked on ) but the install fails with message. "Installation failed" and not much more info.
Any ideas what I can check?
Make sure that the o.s. version of phone on which you trying to install the app is meet the minSdkVersion that you declared in your manifest file. Or if that app is already installed then unistall that and install again. May be it works.
I had the same problem. It was solved by uninstalling the version I had installed via usb from Eclipse. Once that version was off my phone I could email myself APK's and they would load fine.
All your apps need to be signed. Read here:
http://developer.android.com/tools/publishing/app-signing.html
Sign it with something like jarsigner
On the device, go to Settings->Applications->Unknown Sources and make sure that is ticked.
Make sure that there is enough space on the phone, and that the phone is running on the right version of Android.
Finally, if this still doesn't work, then sign your .apk file.
I had the same problem and in the end just signed apks which let them install perfectly. Alternatively if you use something like astro of the play store to backup your apk from the phone running it and send it over to the other phone - this also works. I think it might not be packed right or for some reason it requires a signature to install. It could also be that conflicting signatures are found on the new phone.

App crashes at .apk

The app I created is running great on emulator or on my device when i connect the cable, but when I create an .apk file (I am sending it to myself )and I try to run it on my device in crashes.
In the past it worked in other apps I created but on that case it wont.
I am using the .android/debug.keystore with its default key(android). I've tried to create a new keystore aswell but the app still crashes when I run the apk.
Does anyone have any experience with this kind of error - has any clue how to fix it?
Edit:
the bugSense tells me:
java.lang.NoClassDefFoundError: xx.xxx.xxxxx.xxxxx.CommonUtilities
at xx.xxxx.xxxxx.xxxxx.xxxxxx.onTabChanged(Tabs.java:617)
at xx.xxxx.xxxxx.xxxxx.xxxxxx.initialiseTabHost(Tabs.java:544)
at xx.xxx.xxxxx.xxxxx.xxxxxx.onCreate(Tabs.java:90)
there're two options to your NoClassDefFoundError
ProGuard is shrinking the file and removing/stripping out/re-compressing libraries that your app needs to work.
Your build path is not properly configured and a library you use is not being packed into the .apk
edit:
where's CommonUtilities being defined? External library?
The problem is that I was doing the export of the apk from right click->export!
You must do that kind of export on the final product when it is ready for release.
The right way to export when your app is still on development is right click on the project->Android Tools->Export Signed Application Package.
Many thanks to all for your help learned new things on android from that question.

Invalid apk file?

I made an application and took the .apk file from the bin folder ( eclipse project ). I installed it on my mobile which i used as an emulator earlier and it worked just fine. However when i put the file on a friends mobile it said "cant open package" or something similar when i tried to install the application.
What could be wrong since it worked on mine? The API level was 10, so nothing fuzzy about that.
I've read something about keystore but i dont understand the meaning and function of em.
More than likely your friend phone doesn't accept unsigned packages.
You can either:
A. Sign you application
B. Enable untrusted instals on those phones via Settings > Applications > Unknown Sources
I had same problem.
Test if the size of copied APK file is same as size of file on your PC.
If they are not same, copy the APK file using a RAM reader to your PocketPC memory.

My published Android application won't install onto devices from the android market

I have compiled my application using nbandroid with netbeans 7.0 on a mac. Then keysigned it with jarsigner and aligned it using zipalign. It uploaded to the market with no issue but it will not install on any device giving the error "invalid package file". I have searched many times, but I have only found solutions on how to fix the problem on the device itself. Does anybody know what might be going on here?
Many Thanks,
Daniel
My app had a similar problem. See this Android Signed APK showing incomplete
In the end, I created an alternative eclipse project, copied all the files from original project and signed it using the original key. Seems like this is some eclipse-android plugin issue.

why won't apk file update

I'm developing an android app using Eclipse. I export the app using the Export Android App function. I sign and align the resulting apk file. I then copy this apk to a webserver and try to install it on my phone. It goes though the installation steps, and when I test the app it does not contain my latest changes. It seems to install one of my previous builds.
Is the problem in:
- the way I create the apk?
- a cache on the phone that has not been cleared?
How do I get Eclispe to make a current apk, and how do I get my phone to install it?
How can I verify which version of my code is in a particular apk file?
Thanks,
Gerry
It could be that Eclipse isn't building the new .apk properly, though it sounds like you're exporting correctly. Are you giving the new .apk a different name from the old one? If not, then you could be downloading or installing the old one by accident.
You should be able to go into Settings -> Applications -> Manage Applications on your phone, then find your app and open its info page. The version string should be listed near the top, so you can verify that the latest version is installed.
Try running "adb logcat | tee logfile" (or adb logcat > logfile) before you begin the install attempt, then ctrl-C it and go over the file with a fine tooth comb - there's likely some hints of the problem buried within the noise.

Categories

Resources