为安装了Android版本为Lollipop 5.1(AZPEN A1040平板电脑-适用于最新版本)的android设备编写应用程序。
Wrote app for an android device whose installed Android version is Lollipop 5.1 (AZPEN A1040 tablet - latest version available for it).
该应用程序可以在以下环境中安装并正常运行模拟器(用于模拟Lollipop 5.1设备的设置)
The app installs and works correctly in the emulator (setup to emulate a Lollipop 5.1 device)
但是,在没有任何问题的存档后,尝试将应用的apk文件安装到实际目标设备时,我得到了以下错误:
However, after archiving without any issues, when attempting to install the app's apk file to the actual target device, I get the following error:
解析程序包时出现问题
Visual Studio 2015中的项目属性显示在下图中:
The project's properties in Visual Studio 2015 are displayed in the graphics below:
显示了项目中所有引用的库在下面的图片中:
All the referenced libraries in the project are shown in the picture below:
我都没有在构建,部署到仿真器或归档过程中出现错误或警告。
I have neither errors nor warnings during the build, deploy to emulator or archiving processes.
目标设备已启用以下设置:
The target device has already the following settings enabled:
- 允许安装来自未知来源的应用
- USB调试(已尝试打开或关闭此设置,但未成功安装)
编辑:根据以下评论添加相关信息
- 该apk已签名(以前存档的apk正常工作。 自从那些可以工作的apks开始添加了新代码,但是如上所述,我在构建最新apk时没有错误或警告。)
- 没有尝试过归档调试模式(不确定是否可以让我使用,不确定我是否想尝试,因为这是针对客户端的。)
- apk是在归档过程中命名的。创建后, apk文件的名称未更改(我在归档过程中确实将建议的 名称更改为更短的名称,但对于以前安装了工作的apk版本也这样做了在目标设备上)。
在这一点上,我不知道如何在目标设备上进行安装
At this point I'm at a loss as to what to do to make this install on the target device.
有什么想法吗?
推荐答案弄清楚了什么问题是。设备上关于平板电脑下的设置将Android版本显示为5.1。因此,我在Visual Studio项目中将最低Android目标设置为 Android 5.1(API级别22-Lollipop)。
Figured it out what the issue was. The settings on the device under "About Tablet" displayed the Android Version as 5.1. Because of that, I set the Minimum Android Target in the Visual Studio project as "Android 5.1 (API Level 22 - Lollipop)".
在阅读@Jon_Douglas的评论后,我决定硬着头皮,请客户让我使用他的设备进行故障排除。连接设备后,Visual Studio会将其选择为 AZPEN A1040(Android 5.0-API 21)。
After reading @Jon_Douglas' comment, I decided to bite the bullet and ask the client to let me use his device for troubleshooting. Once I connected the device, Visual Studio picked it up as "AZPEN A1040 (Android 5.0 - API 21)".
我将最低Android目标更改为 Android 5.0( API Level 21-Lollipop),并能够安装apk。将下面的设置图像与上面最初提供的图像进行比较:
I changed the Minimum Android Target to "Android 5.0 (API Level 21 - Lollipop)" and was able to install the apk. Compare the settings image below to the one initially provided above:
更多推荐
xamarin Visual Studio 2015 apk无法安装:错误“正在解析软件包”
发布评论