android - Xamarin Android APP 在启动画面后崩溃

标签 android xamarin.android azure-devops tfsbuild

我使用 Visual Studio Team Service 构建我的 android xamarin 应用程序。构建工作正常,但如果我将 apk 部署到我的手机,它会在登录屏幕后崩溃。 如果我尝试使用 visual studio Archive Manager 创建 apk 文件并部署创建的 apk,它工作正常。我本地创建的 apk 和来自构建服务器的 apk 有什么区别? keystore 文件是相同的。有什么建议吗?

这是我的标志配置 enter image description here

这是我的构建配置 enter image description here enter image description here

更新 1:

我使用了托管构建。现在我创建了一个测试项目(在 Visual Studio 15.1 中创建新的黑色安卓项目)并取消注释这一行 SetContentView(Resource.Layout.Main);

与我的其他项目中的结果相同,应用程序在启动后崩溃。我认为这不是代码的问题,而是构建或签名的问题

更新 2: 将托管构建更改为托管 VS2017 enter image description here

enter image description here

最佳答案

我遇到了同样的问题,并且在签名任务上启用 ZipAlign 选项已解决,也许这也是您需要做的。

enter image description here

关于android - Xamarin Android APP 在启动画面后崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43413595/

相关文章:

android - 如何从 Flutter 中的 Android java Activity 调用 Dart 方法?

java - 为什么基于 Glass/GDK 的 VoiceListener 在 XE16 中只捕获一次 VoiceCommand?

android - Spring 和 Jackson Mapper 无法从 START_OBJECT 中反序列化 CUSTOM_CLASS 的实例

python - 部署 ARM 模板时出错。找不到与模板文件模式匹配的任何文件

powershell - 如何使用 REST API 销毁 TFVC 中的分支?

azure - 当我将 WPF 4.72 应用程序添加到我的解决方案时,为什么我的 Azure Build 会崩溃?

java - 适用于 Android 的随机数学问题生成器

java - "W/AudioFlinger( 34): write blocked for 70 msecs, 2236 delayed writes, thread "是什么意思?

c# - 从任何 Xamarin (Visual Studio 2017) android Activity 向 SignalR hub 发送消息

android - 在 MonoDroid 中以编程方式隐藏键盘