简体   繁体   中英

React Native App crashes on android 11 on launch without giving error

在此处输入图像描述

this is my build.gradle setting and this is my system info在此处输入图像描述

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

setting ** target API to"30" ** in AndroidManifest.xml

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

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")

add this in your android/app/build.gradle

This answer has been provided by manohar-octifi ( github discussion ):

If you are using @sentry/react-native and the version is lower than 2.0.0, then update the version to 2.0.0 or higher (I updated to 2.2.0). This should fix the problem.

May I what version your rest native is when you got crash on this Android API 30??

I have the Same problem to, when using react native version 0.60.4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM