简体   繁体   中英

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

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]

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

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
}

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM