且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

React Native App 在启动时在 android 11 上崩溃而没有给出错误

更新时间:2021-07-01 22:22:07

我将targetSdk版本设置为30时出现这样的错误,这是因为okhttp版本的原因,并使用最新版本修复了它

I got an error like this when setting targetSdk version to 30 it's happening because of okhttp version and fixed it by using the latest version

implementation("com.squareup.okhttp3:okhttp:4.9.1")
implementation("com.squareup.okhttp3:okhttp-urlconnection:4.9.1")

将此添加到您的 android/app/build.gradle