React-Native 应用程序中的网络问题
我使用 React-Native 开发了一个应用程序,我也将它放到了 Google 商店.但是某些设备仍然存在问题.某些设备无法连接到服务器,而其他设备工作正常.
I have developed an app using React-Native and I put that to Google Store also. But still there is an issue for some devices. Some devices cannot connect to the server while other devices are working fine.
我生成了多个 APK 并上传到商店.问题仍然存在.我已将代码放在 android/app/build.gradle 中,我想知道所有设备类型都包含在内.我也应该生成通用 APK 吗?
I have generated multiple APKs and uploaded to the store. Still the issue exists. I have put the code in android/app/build.gradle and I wonder all the device types are included. And should I generate the Universal APK too?
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
我真的建议购买证书,即使它是免费的,但现在你可以像这样更改你的 AndroidManifest:
I really recommend to purchase certificate, even if it's free one, but for now you can change your AndroidManifest like this:
<manifest
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:usesCleartextTraffic="true" tools:targetApi="28">
...
</application>
</manifest>