react-native - 从 Play 商店下载的 React Native 应用程序无法在 android 9 上运行
问题描述
我在 0.59 版本中开发了 react native 应用程序。我在包括 android 9 应用程序在内的每台设备上使用数据线进行了测试,工作正常。我将应用程序上传到 Play 商店,现在我的应用程序可以在除 android 9 之外的所有设备上运行。我还上传了单个 .apk 文件,为不同的 CPU 架构生成了多个 .apk 文件,最后我生成了 android 应用程序包文件并上传到了 Play 商店,但没有一个这些方法适用于 android 9。我的应用程序安装在 android 9 上,但没有在我的应用程序的主屏幕上获取数据。我使用 axios 来获取数据。
解决方案
Add the codes in your main AndroidManifest.xml
<manifest xmlns:tools="http://schemas.android.com/tools"> .... <application android:usesCleartextTraffic="true" tools:targetApi="28"> ... </application> </manifest>
推荐阅读
- docker - “Docker-compose run”显示后端正在运行,但无法从主机访问
- android - Android:写日志文件的库?
- apache-spark - 将后缀附加到 PySpark 行
- kotlin - 使用 gradle 约定插件设置 kotlin jvmTarget 选项
- shell - 如何在shell中转换变量中的字符串
- lua - printf("%s\n", lua_tostring(L, -1)); 遇到分段错误
- php - 跳过修改 CTE 并返回现有键而不是插入新键(如果值已存在)
- javascript - 使用 Ajax 请求产品数据 [Prestashop 1.7]
- javascript - Svelte Cognito RollupJs 错误:node_modules/@aws-crypto/sha256-js/build/index.js 未导出“Sha256”
- java - 我应该为 Android 聊天应用学习哪些课程