【问题标题】:Issue with ionic android signed apk buildionic android签名的apk构建问题
【发布时间】:2023-07-18 21:46:01
【问题描述】:

我遇到了 ionic android 签名 apk 的问题。我的代码在 app-debug.apk 上运行得非常好,但它没有显示 app-release.apk 的数据。发布 apk 已正确安装,但未显示数据。我怀疑这可能是 API 上的 ssl 证书问题。我买了ssl并放了,但是问题仍然存在。任何线索将不胜感激。提前谢谢???

【问题讨论】:

  • 根据 ionic 的版本,我认为如果你调用外部 web 服务,你应该将它们列入白名单:*.com/a/30726493/2745931

标签: angular ionic-framework


【解决方案1】:

将此行添加到 config.xml 中,就在 <platform name="android"> 行之后。希望它会起作用

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:usesCleartextTraffic="true" />
        </edit-config>

【讨论】:

    【解决方案2】:

    如果您的 API 数据未显示,请检查您的网址 它必须是 https 如果是 http://example.org 那么数据将不会显示在移动设备或模拟器上将其更改为 https://example.org

    【讨论】: