简体   繁体   English

Android 应用程序在模拟器上运行良好,但在真实设备上运行时会出现错误解析包

[英]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.

相关问题 SVG文件在模拟器中运行正常,但在Real Device中出错? - SVG file run fine in Emulator but Gives error in Real Device? Android App 在模拟器中运行良好,但无法在真实设备中安装 - Android App running fine in Emulator but can't install in real device 在模拟器中,我的应用可以正常运行,但不能在真实设备中运行 - In emulator my app running fine but not in real device Android 应用程序不在模拟器上运行,而是在真实设备上运行 - Android App NOT Running on Emulator, but on real device Android 应用程序在模拟器上运行而不是在真实设备上运行 - Android app running on emulator not on real device Android应用未在模拟器上运行,也未在真实设备上运行 - Android app not running on emulator nor real device 在flutter中从image_picker包中打开相机会导致真实设备上的应用程序崩溃,但在模拟器(android)中运行良好 - opening camera from image_picker package in flutter crashes app on real device but works fine in emulator (android) android应用程序在模拟器上工作正常,但在实际设备上崩溃,并在android studio中出现以下错误,并附加了代码 - android app works fine on emulator but crashes on real device with following error in android studio the code is attached Android应用程式可在模拟器上正常运作,但在真实装置中当机 - Android app works fine in emulator but crashes in real device 在真实设备上运行应用程序时出现NoClassDefFoundError,而在模拟器上运行时则没有 - NoClassDefFoundError when running app on real device but not when running on an emulator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM