Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse error: there is a issue while parsing the package in marshmallow

I am getting parse error while installing apk in marshmallow devices.
its working fine in nougat devices.

android {
compileSdkVersion 23
buildToolsVersion "25.0.0"
defaultConfig {
    applicationId "com.graymatic.gmind.mylook"
    minSdkVersion 15
    targetSdkVersion 21
    versionCode 1
    versionName "1.4"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true

}

and its showing following error in logs

/PackageManager: Failed collect during installPackageLI
                                             android.content.pm.PackageParser$PackageParserException: Package /data/app/vmdl1108144592.tmp/base.apk has no certificates at entry AndroidManifest.xml
                                                 at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1176)
                                                 at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1130)
                                                 at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:13205)
                                                 at com.android.server.pm.PackageManagerService.access$3600(PackageManagerService.java:327)
                                                 at com.android.server.pm.PackageManagerService$10.run(PackageManagerService.java:11017)
                                                 at android.os.Handler.handleCallback(Handler.java:743)
                                                 at android.os.Handler.dispatchMessage(Handler.java:95)
                                                 at android.os.Looper.loop(Looper.java:150)
                                                 at android.os.HandlerThread.run(HandlerThread.java:61)
                                                 at com.android.server.ServiceThread.run(ServiceThread.java:46)
like image 321
Uma Achanta Avatar asked Jan 05 '18 11:01

Uma Achanta


People also ask

Why am I getting a parse error?

For security reasons, Android doesn't allow users to install applications from unknown sources. So, if you are trying to download a . apk file from other sources apart from Google Play Store, then you may witness the Android Parse Error.

What is file parsing error?

The main reasons for Parse error on Android are as follows: The application that you want to install is not compatible with your Android device. Your device doesn't have permission to install this app. The app file you want to install is corrupt, incomplete, or damaged.


2 Answers

When you generate signed apk check both V1 and V2 change both compile and target sdk versions to 27

edit: enter image description here

check both jar signature and signed apk signature

like image 118
Ege Kuzubasioglu Avatar answered Sep 28 '22 00:09

Ege Kuzubasioglu


You should make both same compileSdkVersion or targetSdkVersion

android {
compileSdkVersion 23
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.graymatic.gmind.mylook"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true

}
like image 20
mehul chauhan Avatar answered Sep 28 '22 01:09

mehul chauhan