Android app running fine on emulator but gives error parsing package when made to run on real device

844 views Asked by At

Here is the error code that Android Studio generates while running app on real device :

Uploading file
local path: C:\Users\Nikhil\AndroidStudioProjects\LoveMeter\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/khurana.nikhil.lovemeter
Installing khurana.nikhil.lovemeter
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/khurana.nikhil.lovemeter"
pkg: /data/local/tmp/khurana.nikhil.lovemeter
Failure [INSTALL_FAILED_OLDER_SDK]
3

There are 3 answers

0
RAAAAM On BEST ANSWER

This because your app is not compatible with your device. It might your developer set the minSDKVersion value to high and If your device API level is lower then minSDKVersion then it gives parsing package error or your developer set the maxSDKVersion to lower than your device API level.

For ex : If your device is Android 2.2 then your developer who made the APK set the minSDKVersion to 10 then it wont work in the Android 2.2 and will give the parsing package error or If your developer set the maxSDKVersion to 8 then app won't install above Android OS 2.2 and if you try to install then you will get the Parsing package error

0
ekimai On

The device is running an older version of android than the minimum in your project.

On Android Studio, this is configured in the build.gradle file.

{
    minSdkVersion 10
    targetSdkVersion 20
}
0
Bidhan On

The error clearly says

Failure [INSTALL_FAILED_OLDER_SDK]

which means that the device has an old SDK, older than the minimum SDK version(minSDK version) required by your application to run.