【问题标题】:Flutter app working when building release-APK but not when provided via Google Play StoreFlutter 应用程序在构建 release-APK 时工作,但在通过 Google Play 商店提供时不工作
【发布时间】:2021-09-24 08:39:56
【问题描述】:

我们有一个连接到互联网的应用程序。

正在构建发布版 APK,并且该应用已连接到互联网。 构建 App Bundle,将其上传到 Google Play 商店并

  • 通过 Google Play 安装该应用正在运行,但无法连接到互联网。
  • 通过 Google Play 控制台中的 App Bundle Explorer 下载 apk,该应用正在运行,但无法连接到互联网。

我还看到 android.permission.INTERNET 已设置...

我的情况可能是什么问题?

【问题讨论】:

    标签: flutter connection release


    【解决方案1】:
    <application android:label="APP_NAME" android:usesCleartextTraffic="true" //Add This>
    </application>
    
    <uses-permission android:name="android.permission.INTERNET"/> //Add This
    

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    【解决方案2】:

    我能想到的选项很少:-

    1. Build the apk from aab you uploaded on play. (test its behaviour)
    2. Check that the flavor you are building, it doesn’t override settings, by having its own manifest.
    3. Test on different devices.
    4. See if there are any certificates installed.
    5. Reverse Engineering (Last Option)
    

    【讨论】:

      【解决方案3】:

      我发现问题不在于与 Internet 本身的连接 - 问题似乎出在 flutter_secure_storage 内部 - 但仅在部署到 Google Play 商店时...

      将flutter_secure_storage更新到最新版本后,问题就消失了。

      【讨论】:

        【解决方案4】:

        这个目录下有一个manifest文件

        android/app/src/debug/AndroidManifest.xml

        从上面的目录复制internet权限,并在这个目录中添加internet权限

        android/app/src/main/AndroidManifest.xml

        【讨论】:

        • 正如我写的那样,当我在发布模式下构建应用程序并且设置了权限并且 已经存在于 android/ app/src/main/AndroidManifest.xml.
        猜你喜欢
        • 2021-06-17
        • 2018-10-30
        • 1970-01-01
        • 2020-05-10
        • 1970-01-01
        • 1970-01-01
        • 2018-11-09
        • 2021-06-16
        • 2021-08-31
        相关资源
        最近更新 更多