简体   繁体   English

手机上的apk解析错误,但在模拟器上效果很好

[英]apk parse error on phone but works well on emulator

My application runs well on emulator but when I run on device it gives error parsing the package!! 我的应用程序可以在模拟器上很好地运行,但是当我在设备上运行时,它会在解析包时出错!

what changes should be made to make it work on device? 应该进行哪些更改才能使其在设备上运行?

Installation can give the specified error in following cases: 在以下情况下,安装会产生指定的错误:

Name of the package is changed after signing: Use the exact name as the signed package is (instead, adjust the name in Manifest)
Package is compiled against on higher API level: Correct the API level in Manifest file
Package is executed from SD-card: Run (install) the apk -file from phones memory OR use adb command to install it

Most likely, you are compiled against a higher API level. 很可能是针对更高的API级别进行编译的。 Go to your Manifest file and change this line 转到清单文件并更改此行

uses-sdk android:minSdkVersion="VERSION_NUMBER_YOU_USING"

to

uses-sdk android:minSdkVersion="3"

and see if you can install the apk on your device. 并查看是否可以在设备上安装apk。

Your minSdkVersion value in Android-Manifest.xml is more than your phone API level. 您在Android-Manifest.xml中的minSdkVersion值大于电话API级别。 reduce it to be installable on your phone. 减少它以使其可在您的手机上安装。 Find appropriate API level for Android version of your phone here: 在此处找到适用于您手机的Android版本的适当API级别:
1.5 : API level 3 1.5:API级别3
1.6 : API level 4 1.6:API级别4
2.0 : ApI level 5 2.0:ApI 5级
2.0.1: API level 6 2.0.1:API级别6
2.1: API level 7 2.1:API级别7
2.2: API level 8 2.2:API级别8
2.3: API level 9 2.3:API级别9
2.3.3: API level 10 2.3.3:API级别10
3.0: API level 11 3.0:API级别11
3.1: API level 12 3.1:API级别12
3.2: API level 13 3.2:API级别13
4.0: API level 14 4.0:API级别14
4.0.3: API level 15 4.0.3:API级别15
4.1: API level 16 4.1:API级别16

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flutter 应用程序 apk 在手机上无法正常运行,但在模拟器上运行良好 - Flutter app apk does not work properly on phone but works well on emulator 模拟器和电话代码运行良好,但当 APK 发布时它不起作用 - emulator and phone code run well but when APK release it didnt work 应用程序在模拟器上运行良好,但在手机上运行时会崩溃 - Application works well on emulator but it crashes when run on the phone Android小部件在模拟器中运行良好,但在手机上它变成了Google App小部件 - Android widget works well in emulator but on phone it turns into the Google App widget 扩展的SimpleCursorAdapter重写的bindView在模拟器上效果很好,但在手机上效果不佳? - Extended SimpleCursorAdapter overrided bindView works well on emulator but not on phone? 在手机上运行时出错,而在模拟器上运行时 - Error when running on a phone, while it works on the emulator 我在电话上收到错误,但在模拟器上可以正常工作 - I get error on phone but on emulator it works fine LocationListener适用于模拟器,而不是电话 - LocationListener works on emulator, not on phone 代码适用于模拟器但不适用于电话 - code works on emulator but not on Phone MapView可在模拟器上使用,但不能在手机上使用 - MapView works on emulator but not on phone
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM