Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

test: Reply
 
LinkBack Thread Tools
Old July 9th, 2013, 10:16 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jul 2013
Posts: 4
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default .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.

Advertisements
CorporalCuddle is offline  
Reply With Quote
sponsored links
Old July 9th, 2013, 10:33 AM   #2 (permalink)
~Play Nice~
 
Unforgiven's Avatar
 
Join Date: Jun 2010
Location: Douglas, MA
Gender: Male
Posts: 24,933
 
Device(s): Moto X Developer Edition, Nexus 7 (2012 & 2013), Note II, S3
Carrier: Not Provided

Thanks: 15,575
Thanked 16,912 Times in 9,303 Posts
Default

Welcome to AF. I moved this to the Application Development forum where I think you will get better answers.
__________________

Join the fun and make some friends, register for free here.
If someone helped, hit Thanks, if you see rude or abusive posts, spam, or threads that need staff attention, hit Report.
Site Rules / Android Forums FAQ
*** Do you want to talk guns? ***

Unforgiven is offline  
Reply With Quote
Old July 9th, 2013, 11:35 AM   #3 (permalink)
Junior Member
 
taimur97's Avatar
 
Join Date: Sep 2012
Location: Pakistan
Gender: Male
Posts: 16
 
Device(s):
Carrier: Not Provided

Thanks: 3
Thanked 1 Time in 1 Post
Send a message via Yahoo to taimur97 Send a message via Skype™ to taimur97
Default

Hi unforgiven r u a developer?I need some help
taimur97 is offline  
Reply With Quote
Old July 9th, 2013, 11:41 AM   #4 (permalink)
~Play Nice~
 
Unforgiven's Avatar
 
Join Date: Jun 2010
Location: Douglas, MA
Gender: Male
Posts: 24,933
 
Device(s): Moto X Developer Edition, Nexus 7 (2012 & 2013), Note II, S3
Carrier: Not Provided

Thanks: 15,575
Thanked 16,912 Times in 9,303 Posts
Default

Quote:
Originally Posted by taimur97 View Post
Hi unforgiven r u a developer?I need some help
Nope, I wouldn't know where to start.
Unforgiven is offline  
Reply With Quote
Old July 9th, 2013, 08:24 PM   #5 (permalink)
Senior Member
 
out of ideas's Avatar
 
Join Date: May 2012
Posts: 642
 
Device(s): ZTE Merit. ICScamwich OC. Galaxy Prevail CTMod 3.68
Carrier: Pigeons

Thanks: 61
Thanked 145 Times in 114 Posts
Default

You probably have the min SDK set higher than gingerbread (SDK 10). Check your manifest and build min max and targets.
__________________
Stuff of mine:
Ice Cream Scamwich (ZTE 990s)

Deodexed Stock ZTE Merit
out of ideas is offline  
Reply With Quote
The Following User Says Thank You to out of ideas For This Useful Post:
Unforgiven (July 10th, 2013)
Old July 10th, 2013, 01:21 PM   #6 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jul 2013
Posts: 4
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
CorporalCuddle is offline  
Reply With Quote
Old July 10th, 2013, 02:28 PM   #7 (permalink)
Senior Member
 
out of ideas's Avatar
 
Join Date: May 2012
Posts: 642
 
Device(s): ZTE Merit. ICScamwich OC. Galaxy Prevail CTMod 3.68
Carrier: Pigeons

Thanks: 61
Thanked 145 Times in 114 Posts
Default

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.
out of ideas is offline  
Last edited by out of ideas; July 10th, 2013 at 02:35 PM.
Reply With Quote
Old July 10th, 2013, 02:59 PM   #8 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jul 2013
Posts: 4
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

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)
CorporalCuddle is offline  
Last edited by CorporalCuddle; July 10th, 2013 at 03:04 PM.
Reply With Quote
Old July 10th, 2013, 05:26 PM   #9 (permalink)
Senior Member
 
out of ideas's Avatar
 
Join Date: May 2012
Posts: 642
 
Device(s): ZTE Merit. ICScamwich OC. Galaxy Prevail CTMod 3.68
Carrier: Pigeons

Thanks: 61
Thanked 145 Times in 114 Posts
Default

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.
out of ideas is offline  
Reply With Quote
Old July 11th, 2013, 08:16 AM   #10 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jul 2013
Posts: 4
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
CorporalCuddle is offline  
Reply With Quote
sponsored links
Old July 11th, 2013, 02:33 PM   #11 (permalink)
Senior Member
 
out of ideas's Avatar
 
Join Date: May 2012
Posts: 642
 
Device(s): ZTE Merit. ICScamwich OC. Galaxy Prevail CTMod 3.68
Carrier: Pigeons

Thanks: 61
Thanked 145 Times in 114 Posts
Default

Whats wrong with your dev computer?

Try it on another phone to see if the problem is your phone or the apk
out of ideas is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:35 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.