• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps .apk files giving parse error ... they worked before

I dabbled with writing Android applications around two years ago. I still have the projects that I did then, and those projects run on my phone (Samsung Charge, firmware version 2.3.6).

I have recently gotten back into developing Android applications. However, every time I try to run an application on my phone now, I get the error message - "Parse Error - There is a problem parsing the package."

Two years ago, I used Eclipse to develop projects, which is what I'm using now. Though, I had to reinstall eclipse and everything else. So it's a new setup but I believe it's the same general setup.

I can put my old .apk files on my phone, and they work fine. If I put any newly created .apk files on my phone, I get the parse error.

I also found that if I compile any OLD projects and then copy those onto my phone, that I get the parse error.

This leads me to believe I've got something set up wrong in Eclipse that my phone isn't liking.

I thought maybe it was the virtual device manager, so I've tried several combinations of virtual devices - 1.5, 2.1, 2.2, 2.3.3 - using any of them still gives the parse error when trying to run the applications on my phone.

By the way, all of these projects work in the emulator running through Eclipse, so I know they work.

This is driving me crazy, and I've been trying to find out why this is happening for two days now.

If anyone can help me out or point me in a helpful direction I would greatly appreciate it, as my frustration with this is leading me in circles.
 
I'm copying the .apk from the bin folder on the development computer and THEN putting the .apk file on my phone (through usb connection). I place the .apk on the phones sd card.

I'm not clear on the debug key. The old .apk files still work if I put them on my phone without running them in eclipse (and I made them 2 years ago), but NONE of them work if run through eclipse. If I create a whole new project with new code, those don't work either.

(When I say don't work after running through eclipse, I mean, if I run a project through eclipse - and they all run fine IN ECLIPSE - they won't work on my phone then)
 
Upvote 0
oh yeah. The one in the bin folder of your workspace isn't the actual full signed apk.

connect your phone through USB while eclipse is open. go to run configurations. then target tab. do "autmatically pick Device" uncheck all the AVDs you have set up. that way it will prompt you when you run it.

save that and close. highlight the project you want to run, chose "run" from the top row in eclipse. pick Run as android application. then you should get a prompt that says pick a device. it your phone is GB and it can run on GB then it will have a section with yours, and a section with the AVDs you have. Pick your phone. it should pop up on there.(if it doesnt, read the "console" tab to see whats going on.)

Alternately, chose "Export" from the file menu, the go through it and sign it and it will pop out a completed apk. you can put THAT apk on your phone and try it.

EDIT this is all on Juno, but should should be pretty much the same on other recent eclipse versions.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones