[英]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 :这是 Android Studio 在真实设备上运行应用程序时生成的错误代码:
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.
它可能您的开发人员将 minSDKVersion 值设置为高,如果您的设备 API 级别低于 minSDKVersion 那么它会导致解析包错误,或者您的开发人员将 maxSDKVersion 设置为低于您的设备 API 级别。
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例如:如果您的设备是 Android 2.2,那么您制作 APK 的开发人员将 minSDKVersion 设置为 10 那么它就不会在 Android 2.2 中工作并且会出现解析包错误或者如果您的开发人员将 maxSDKVersion 设置为 8 那么应用程序将不会安装在 Android OS 2.2 以上,如果你尝试安装,你会得到解析包错误
The device is running an older version of android than the minimum in your project.该设备运行的 android 版本比您项目中的最低版本旧。
On Android Studio, this is configured in the build.gradle file.在 Android Studio 上,这是在 build.gradle 文件中配置的。
{
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.这意味着设备有一个旧的 SDK,比您的应用程序运行所需的最低 SDK 版本(minSDK 版本)旧。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.