android - Xamarin Android App 的发布构建失败,调试构建成功

标签 android xamarin amazon-cognito

我有一个使用 AWS Cognito 的 Xamarin 应用程序。它在调试时构建并运行良好。当我切换到 Release 时,我收到以下错误:

找不到类型 Amazon.Util.Internal.PlatformServices.NetworkReachability 的默认构造函数。

我已采取的解决步骤:

  1. 在 AndroidManifest 中添加了 INTERNET 权限。
  2. 比较项目的所有构建配置屏幕以确保调试和发布匹配。
  3. 关闭优化代码选项。

最佳答案

将链接选项更改为“无”解决了该问题。链接器似乎正在删除一些必要的功能。

关于android - Xamarin Android App 的发布构建失败,调试构建成功,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49279506/

相关文章:

amazon-web-services - AWS Cognito : Custom Challenge with Retry

amazon-web-services - 如何将Google SSO配置为仅接受具有特定域的电子邮件地址?

android - 如何根据另一个 Activity 的结果启用/禁用按钮?

android - createScreenCaptureIntent 不返回结果

xamarin - 在 VS 2017 中在哪里设置 RemoteRootDirectory 来编译 iOS C++ 共享库

c# - 从项目中检索父项时出错

ios - 如何在 Swift 3 中正确使用 Amazon Cognito iOS SDK?

java - Android中从USB串口读取数据

android - helloworld 使用的 RAM 内存

android - 重复使用 Xamarin.Essentials.MediaPicker.CapturePhotoAsync 会在 Android 11 上重新启动我的应用程序