React Native android 应用程序无法在发布中运行
React Native android app not working in release
我使用 React Native 制作了一个应用程序。该应用程序连接到我制作的 api。我按照以下步骤操作:https://facebook.github.io/react-native/docs/signed-apk-android,现在如果我安装 react-native 运行-android --variant=release.The 应用程序,应用程序将无法运行,但我无法登录应用程序。有什么方法可以查看我是否遇到任何错误或其他问题?
我尝试寻找一种方法来显示调试控制台,即使变体已发布,但我找不到任何方法
我希望应用程序作为未发布变体的应用程序运行。
请尽量准确,否则问题难以理解。
为了在发布模式下捕获问题,我们有几个库可以帮助我们进行调试,即使真实用户正在使用该应用程序也是如此。检查以下两个库,它们可能会帮助您找到问题。
- Busgnag
- Crashalytics, react-native-firebase
中的一个模块
我认为问题是因为这是一个 http
请求。
这可能会解决您的问题:
也许您需要在 AndroidManifest.xml 的 application
标签内添加 android:usesCleartextTraffic="true"
。
像这样:
<application
...
android:usesCleartextTraffic="true"
...
>
...
</application>
我使用 React Native 制作了一个应用程序。该应用程序连接到我制作的 api。我按照以下步骤操作:https://facebook.github.io/react-native/docs/signed-apk-android,现在如果我安装 react-native 运行-android --variant=release.The 应用程序,应用程序将无法运行,但我无法登录应用程序。有什么方法可以查看我是否遇到任何错误或其他问题?
我尝试寻找一种方法来显示调试控制台,即使变体已发布,但我找不到任何方法
我希望应用程序作为未发布变体的应用程序运行。
请尽量准确,否则问题难以理解。
为了在发布模式下捕获问题,我们有几个库可以帮助我们进行调试,即使真实用户正在使用该应用程序也是如此。检查以下两个库,它们可能会帮助您找到问题。
- Busgnag
- Crashalytics, react-native-firebase 中的一个模块
我认为问题是因为这是一个 http
请求。
这可能会解决您的问题:
也许您需要在 AndroidManifest.xml 的 application
标签内添加 android:usesCleartextTraffic="true"
。
像这样:
<application
...
android:usesCleartextTraffic="true"
...
>
...
</application>