React Native App 在启动时在 android 11 上崩溃而没有给出错误 [英] React Native App crashes on android 11 on launch without giving error
问题描述
这是我的 build.gradle 设置,这是我的系统信息
this is my build.gradle setting and this is my system info
我正在尝试在 android 11 上运行 react 本机应用程序,但它在启动时一直崩溃而没有给出任何错误我尝试了几乎所有解决方案,包括在 build.gradle 中设置
I'm trying to run the react native app on android 11 but it is keep crashing on launch without giving any error I have tries almost every solution including setting in build.gradle
buildToolsVersion = "30.0.0"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
supportLibVersion = "30.0.0"
ndkVersion = "20.1.5948944"
multiDexEnabled = true
将 ** 目标 API 设置为30"** 在 AndroidManifest.xml 中
setting ** target API to"30" ** in AndroidManifest.xml
我使用的 Gradle 版本是Gradle 插件版本是 4.1.3Gradle 版本是 6.7**
the Gradle version I'm using is Gradle plugin version is 4.1.3 Gradle version is 6.7**
请帮我找到这方面的解决方案,谢谢
please help me find the solution in this regard thanks
推荐答案
我将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
这篇关于React Native App 在启动时在 android 11 上崩溃而没有给出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!