Android Hello Hello tutorial. Error: [Parse Error] The problem is in the parse of the package
Today I decided to start developing for Android OS. I went to their website, downloaded all the software I needed (Eclipse, Android SDK, ADT Plugin for Eclipse, etc.). I followed the tutorial "Hello World" ( link text ). I am using Android SDK 2.1. The program worked almost flawlessly. It works fine on Android emulator, but won't install on any Android phones. I don't have an Android phone, so I had three friends of mine trying to install the program on theirs. The phones we used were:
- ROOTED G1 works 2.1
- Droid works 2.1
- Another Droid running 2.1
I have emailed the .apk to myself in gmail and accessed it through the android emulator. He ran and installed the package just fine. However, when my friends tried to install it on their phones, they all encountered this error: "[Parsing error] The problem is in the parsing of the package."
I am wondering if anyone has any suggestions as to what might be wrong. Thanks for your help.
a source to share
do not worry. It's not a big problem. I also spend a week on this and finally I got a solution. Just go to the manifest.xml file and make the changeover.
//uses-sdk android:minSdkVersion="14"
Just change it to
//uses-sdk android:minSdkVersion="3"
Or any lower level sdk version supported by our device. Try it. And answer whether you are satisfied or not.
a source to share
You don't need to use a dedicated app to install anything. Just try opening it from your SD card (ok, so you need a file manager for that: p) or direct access to the file via email should really work. Check two things:
- As I added the comment, what package name are you using?
- Do any of these phones have a setting to install apps from outside the market? This is done through settings -> applications. If it doesn't, the installation might not be allowed because you probably haven't signed the application as a "finished application" - by default everything is signed with a debug key.
Edit:
I just ruined and it looks like some other people had this problem. However, in each case it was solved differently ... In one case, using a third-party application to create files solved the problem. In either casethe developer renamed the .apk file after signing and exporting it and apparently that was enough to split it for him. It doesn't make any sense to me - I just tested it on my phone with three different versions: signed the debug key, signed the "correct" key and signed with the correct key, and then renamed. In each case, the app was copied to my SD card, opened with Astro (file viewer), which in turn launched the built-in installer app. All three worked, so I don't know how the other guy was having trouble renaming his .apk.
So ... I don't know. Sorry: / Maybe try installing it from apk with a debug subscription, or maybe start another project from scratch and check if your manifest file is corrupted.
To respond to your comments:
- The package name is the style name com.example.helloandroidtwo. The apk name is just the name of the zip file (APKs are only zip files!) And shouldn't matter. Your package name looks great, hmm.
- It turns out you signed your application "correctly". Creating such a keystore makes it a valid key, not a debug one. I didn't think it would make a difference, but it was worth checking out. I won't sign my apps with the proper key until I actually put them on the market.
- Taking API level 7 is great as all of your test phones are also running at level 7 (v2.1). You usually don't want to set the mininum version to 7 as this will rule out most users, but that shouldn't be your problem here. However, to be sure, edit the project properties to set the target to level 3. If you haven't loaded all the API levels at startup, you probably won't have it anymore. Download it using AVD Manager in Eclipse.
a source to share
The simplest solution is to use a browser to access your gmail account using http://mail.google.com and download the attachment from the link. After that, you can start the installation if you have enabled the installation of non-market applications.
a source to share