I'm getting a CompileSdkVersion error when I install react-native-screens to my project. I have followed the changes needed to make react-native screens work from the documentation and controlled if there is version mistake but it seems like there isn't any! Could you help me out. Thank you in advance
The versions I am working on are:
``
dependencies": {
"@react-navigation/native": "^6.1.1",
"react": "18.1.0",
"react-native": "0.70.6",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2"
`
This is my android/build.gradle config `
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
}
`
This is my android/app/build.gradle config `
`
defaultConfig {
applicationId "com.navigationtrial"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
versionCode 1
versionName "1.0"
`
This is the default config in node_modules\react-native-screens\android\build.gradle
apply plugin: 'kotlin-android'
android { compileSdkVersion safeExtGet('compileSdkVersion', 28)
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 21)
targetSdkVersion safeExtGet('targetSdkVersion', 22)
versionCode 1
versionName "1.0"
`