gpt4 book ai didi

android - 作业失败,出现异常 : System. Reflection.TargetInitationException Unity 错误

转载 作者:行者123 更新时间:2023-12-03 08:05:12 24 4
gpt4 key购买 nike

我最近收到此错误:

Job failed with exception:System.Reflection.TargetInvocationException: Exception has been thrownby the target of an invocation. ---> System.InvalidOperationException:Insecure connection not allowed and this warning with it: Non-securenetwork connections disabled in Player Settings

每当我运行游戏构建到 Android、强制解析等时,都会发生这种情况。

我使用的是 Unity 2022.1.0b2,之前从未遇到过此错误。

我已经被这个问题困扰好几天了,找不到这个修复程序,在此之前我收到一条消息,说我构建到 android 时出现太多错误,但幸运的是,我通过删除 Plugins 文件夹找到了修复程序,因为它将被创建再次。

我使用 firebase 数据库和身份验证,当我构建到 android 并放在 google play 上时,firebase 不起作用并且不显示任何内容(没有排行榜,也没有登录/注册)。
在 Unity 编辑器中,firebase 的东西可以工作并且很好,只是不在构建中。

我还使用 Unity ADS 和 Unity IAP,两者都可以在构建后和编辑器中使用。

最佳答案

问题是您正在使用 http 连接。您有两个选择:

<强>1。编辑 -> 项目设置 -> 播放器 -> 其他设置 -> 配置 -> 允许通过 HTTP 下载设置“始终允许”

<强>2。将您的 http 请求包装在 try/catch block 中

认为这两个选项可以解决大多数出现此错误的情况。

关于android - 作业失败,出现异常 : System. Reflection.TargetInitationException Unity 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72582693/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com