"Analysis error: problem with package parse" when installing an Android application

I got this error when installing an Android application ( Parse Error : There is a problem parsing the package. ). I have taken the following steps.

  • I first installed the application and it works great.

  • I made changes to the existing application and changed the no version in the manifest file.

     <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.openintents.samples.BasicOpenARDemo" android:versionCode="2" android:versionName="1.0.1"> 
  • Then I export the application and complete the code signing process. To do this, right-click your project node> select Export. There you will see the wizard. Follow the steps and complete the code signing.

  • I received the file ARDemo.apk, then I changed its name to ARDemo1.apk

  • Then I sent this apk file to my mobile SD card and started the installation. I got the above error.

I googled, they say the problem is with unpacking the manifest file.

Can someone tell me what could be wrong with me?

+88
android
Sep 29 '09 at 13:01
source share
22 answers

You said that when you first started the application, it worked fine.

The only difference in the steps you specified between the two versions:

  • Version number (I assume this was not involved in violating anything)
  • The code
  • .Apk file name

Try renaming the ARDemo1.apk file back to ARDemo.apk (be sure to back up the old version) and see if that helps. I assume this has something to do with the apk name.

If it still does not work, you can remove the apk file name as the source of the problem and start investigating 2) by rebuilding the old version and see if you have the same problem again. If the problem does not occur with the restored version of your old code, then you know that this should be something related to your code.

I hope you get somewhere.

Cheers, Joseph

+42
01 Oct '09 at 0:41
source share

The installation may give the indicated error, at least in the following cases:

  • The package name changes after signing : use the exact name as the signed package (edit the name in the manifest instead)
  • The package is compiled at a higher level API . Correct the API level in the manifest file.
  • The package is made from the SD card : Run (install) the apk file from the phone’s memory or use the adb command to install it
+42
Jun 13 '11 at 11:30
source share

I only saw a parsing error when the Android version on the device was lower than the version with which the application was compiled. For example, if the application is compiled for android OS v2.2, and your device only has Android OS v2.1, you will receive a parsing error when trying to install the application.

+20
Jul 16 '10 at 21:14
source share

The reason is because apk is not signed. After signing apk the problem will be solved. http://ionicframework.com/docs/guide/publishing.html Please use the instructions link to sign the apk.

+12
Jan 11 '16 at 16:54 on
source share

Instead of shooting in the dark, find the cause of this error by installing it through adb :

 adb -s emulator-5555 install ~/path-to-your-apk/com.app.apk 

Replace emulator-5555 with the name of your device. You can get the list using:

 adb devices 

Failure will give a reason. Common reasons and their corrections:

  1. INSTALL_PARSE_FAILED_NO_CERTIFICATES : link
  2. INSTALL_FAILED_UPDATE_INCOMPATIBLE : link
+8
Jan 16 '18 at 18:33
source share

If you compile and export the apk file in the SDK version 2.1, it will not work on any version of Android below your export SDK "2.1". Android compatible software is not backward compatible. For example, if you program using the Android NDK (an addition to the Android SDK package), which allows development in the C / C ++ family, this is only compatible with Android 2.2, Android 2.2 and below only supports java builds. Therefore, you will repeat the error "Error while analyzing the package."

+6
Feb 22 '11 at 6:37
source share

Check if your device supports the version specified in minSdkVersion in AndroidManifest.xml. If you do not specify a lower version and try again

+4
Apr 30 '14 at 11:37
source share

I got the same error (Parse Error, a problem with parsing the package) when trying to install the .apk package from email. I was able to work around this problem by installing the ApKatcher third-party package installer:

http://www.addictivetips.com/mobile/install-android-apps-from-gmail/

ApKatcher is not the only solution. My colleague ran into a problem installing Astro File Manager.

You can find both apps in the Android Marketplace.

+2
Sep 16 '11 at 16:19
source share

I do not repeat what is indicated here for entering a keystore, password, etc. Try

Build → Create a signed APK → [Login] --- Next ---> select BOTH

  • V1 (Jar Signature)
  • V2 (Full Signature APK)

I don’t know why, but at least it worked in my situation.

+2
Feb 26 '18 at 6:33
source share

And to help new readers, another cause may be errors in the manifest file. I made a mistake android:service as android.service and ran into the same error ...

+1
Mar 03 '15 at 13:40
source share

A similar problem using this "borrowed" and slightly modified code:

  Intent intent = new Intent(Intent.ACTION_VIEW); File newApk = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "myapp.apk"); intent.setDataAndType(Uri.fromFile(newApk), "application/vnd.android.package-archive"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); result = true; 

It is necessary to change the file creation to this (a comma instead of a plus in the File constructor, there was "/" after the download directory):

  File newApk = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "myapp.apk"); 
+1
Jun 03 '15 at 15:49
source share

Another possibility is that you saved the apk file in the PRIVATE application folder, and then try installing (by running the intent from your code). in this case, when you start to wash, you get an error analysis package. In this case, the error encountered is related to permissions. The fact is that saving the file to private folders is not good practice, however, if you really want to, you must write the file to MODE_WORL_READABLE when downloading it. Please note that MODE_WORLD_READABLE is deprecated and this solution is not the best, as it has some security issues. It is best to save the file to external storage.

+1
Aug 05 '15 at 5:45
source share

I had a couple of bad tags in the manifest file.

 <meta-data> </meta-data> 

Basically, when I copied the meta-data error code from the pdf file. Shit.

+1
Sep 17 '15 at 12:03
source share

Another issue causing this error may be installing the APK from the limited mount point of the SD card /mnt/media_rw/MicroSD .

Use unlimited mount point /Removable/MicroSD .

+1
Jul 11 '16 at 9:15
source share

For everyone who has this problem, the only time I got this error was that the version of the API in the Android Build configuration does not match what is on the physical device.

Go into Eclipse and right click on your project and go to properties. Choose Android - THAT Takes YOU TO REGISTER. Configure the target audience to match the device and see if this fixes the problem.

0
Mar 12 '13 at 18:54
source share

I had this problem even when I specified the correct version of minSDK and targetSDK. My problem was that I used "android:theme="@android:style/Theme.NoTitleBar.Fullscreen" in the launch activity on the Jellybean device. When I removed this attribute, it worked.

0
Mar 11 '15 at 11:40
source share

One reason may be that the name of your activity is not defined in the manifest.

  <activity android:name="" ...> </activity> 

above code was creating the same problem with me

0
Jan 25 '16 at 7:49
source share

As mentioned in the other two answers, you may experience problems installing from an SD card. In my case, I distributed my application using an email attachment, and it usually worked fine. Just open the email and download the application (it seems to go to the SD card) and click on it again and it will be installed.

But one day it did not work, and it turned out that it was due to the fact that I connected the phone to my development computer via USB, and this put the SD card in a different mode or something like that. Thus, the solution was simply to disconnect the phone from the PC, and then send the email again and download the application again. Or put the USB connection in “charge only” mode so that the SD card is not “connected” to the PC.

0
Feb 06 '16 at 15:14
source share

You can also check the logs on the device to make sure this is something as simple as a permission issue. You can check the logs using adb from the host / debug computer:

 adb logcat 

Or, if you have access to the console (or when using the Android-x86 console, get the console by typing Alt + F1 ), you can check the logs using the logcat :

 logcat 
0
May 17 '17 at 17:05
source share

I had the same problem as the apk file exported from android‌ Tools > Export . Instead, I used the apk file in the bin folder and it will work!

PS The apk file in the bin folder is created after the first launch of the application in eclipse.

0
Jun 13 '17 at 14:15
source share

As @Veneet Reddy already mentioned, install it through ADB.

Go to ADT Bundle / sdk / platform-tools for your .apk file and run the command line as administrator.

Then run the adb devices command which will list the connected devices or emulators that work.

enter image description here

Then run adb -s yourDeviceID install yourApk.apk

enter image description here

Note: uninstall the application if you have already installed before reinstalling.

0
Dec 11 '18 at 18:35
source share

I came across the same error message "Analysis error: packet parsing problem" with my signed APKs, but I suspect that this may be due to various reasons.

To test this, I did the following:

Configure Windows 8.1 Eclipse ADT Build: v22.6.2-1085508

I created a typical new Helloworld application that accepts all default values.

I ran the application on an emulator and supported the device.

Then I downloaded and installed apk on my live device and successfully executed it.

He created apk in a bin folder of 782KB in size.

Then I exported the Helloworld application to the same bin folder that signed the application from my keystore, which was previously used for promotion on Google Play.

He created a 385KB APK (replacing the original apk).

I downloaded apk to my device, and when I went to install it, I got the error message "Parsing error: Parse parsing problem" (this is the same package that was downloaded and installed when it runs as an unexported form).

-one
May 24 '14 at 14:50
source share



All Articles