0

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"

`

4
  • Can you share the screenshot of the issue? Commented Dec 21, 2022 at 9:21
  • yes ofcourse I will Commented Dec 21, 2022 at 20:13
  • You should remove these damn folders. rm -rf android/build android/app/build. And rebuild the app. Commented Dec 22, 2022 at 6:47
  • its giving ,e this error A parameter cannot be found that matches parameter name 'rf'. Commented Dec 22, 2022 at 13:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.