“Parse Error : There is a problem parsing the pack

2019-01-01 00:41发布

I got this error while installing the android application (Parse Error : There is a problem parsing the package.). I did the following steps.

  1. First time I installed the application and it works fine.

  2. I made changes to the existing application and change the version no in 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">
    
  3. Then I export the application and finish the code signing process. For this, Right Click your Project node > select Export. There you will see a wizard. Follow the steps and finish the code signing also.

  4. I got the ARDemo.apk file, Then I changed it’s name to ARDemo1.apk

  5. Then I shipped this apk file to mobiles SD Card and started the installation I got the above error.

I googled, they say that problem with unpacking manifest file.

Can anyone tell me what could be wrong with me?

标签: android
22条回答
春风洒进眼中
2楼-- · 2019-01-01 01:28

If you're compiling and exporting your apk file under SDK version 2.1, it will not work on any android version below your SDK export "2.1". Android software is forward compatible not backward compatible. For example if you're programming using the android NDK (ann add-on to the android SDK) package that allows development in the C/C++ family, this is only compatible with android 2.3, android version 2.2 and below support java builds only. Therefore you will reaceive the "There is a problem parsing the package" error.

查看更多
路过你的时光
3楼-- · 2019-01-01 01:31

As a couple of the other answers have mentioned, there can be problems when installing from the SD card. In my case I was distributing my app via email attachment, and it usually worked fine. Just open the email and download the attachment (it apparently goes to the SD card) and click on it again and it gets installed.

But then one day it didn't work, and it turned out it was because I had the phone connected to my development PC via USB, and that placed the SD card in a different mode or something. So the solution was simply to disconnect the phone from the PC and then send the e-mail again and download the attachment again. Or else place the USB connection in "charging only" mode so the SD card is not "connected" to the PC.

查看更多
孤独寂梦人
4楼-- · 2019-01-01 01:32

I am experiencing the same “Parse error: There is a problem parsing the package “ error message with my signed APKs as others but I suspect it could be caused by different reasons.

To test this I did the following:

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

I generated a typical new Helloworld app accepting all defaults.

I ran the app on an emulator and live device successfully.

I then sideloaded and installed the apk to my live device and ran it successfully.

It had generated an apk in the bin folder with a size of 782 KB.

I then exported the Helloworld app to the same bin folder signing the app from my key store which has been used successfully in the past to promote to Google Play.

It created an APK with a size of 385 KB (replacing the original apk).

I sideloaded the apk to my device and when I went to install it I got the error “Parse error: There is a problem parsing the package” (this is the same package that sideloaded and installed when done as a non exported form).

查看更多
回忆,回不去的记忆
5楼-- · 2019-01-01 01:33

Instead of shooting in the dark, get the reason for this error by installing it via adb:

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

Replace emulator-5555 with your device name. You can obtain a list using:

adb devices

Upon failing, it will give a reason. Common reasons and their fixes:

  1. INSTALL_PARSE_FAILED_NO_CERTIFICATES: Reference
  2. INSTALL_FAILED_UPDATE_INCOMPATIBLE: Reference
查看更多
登录 后发表回答