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.
 

Unforgiven

...eschew obfuscation...
Administrator
Welcome to AF. I moved this to the Application Development forum where I think you will get better answers.:)
 

CorporalCuddle

Lurker
Thread starter
In the manifest I have "minSdkVersion=8" and "targetSdkVersion=10". I even created a new project to ensure I didn't set something wrong. I have the Target as 2.3.3, API level 10.

Is there any other possible issues you can think of? I appreciate the help by the way.
 

out of ideas

Android Enthusiast
Are you trying them on your phone through Eclipse>run or are you exporting them, then doing it from sdcard or gmail or something like that?


there's a chance it could still be using your old debug key, and those were only good for one year, they have since been updated to last longer.
 

CorporalCuddle

Lurker
Thread starter
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)
 

out of ideas

Android Enthusiast
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.
 

CorporalCuddle

Lurker
Thread starter
I failed to mention - I can not connect my phone directly to my development computer. It's a process that involves moving it to another computer and then copying the .apk to my phone. So, I can't do your first suggestion.

I did the export - one signed and one unsigned. Had no effect. Still the package parsing error.
 
Top