zoontek / react-native-dev-menu

Add custom items to the React Native dev menu.
MIT License
204 stars 25 forks source link

Upgrade android SDK dependencies #37

Closed ernest0vm closed 2 years ago

ernest0vm commented 2 years ago

Why it is needed?

Plase upgrade buildToolsVersion to 33.0.0 and targetSdkVersion, compileSdkVersion to 33, Currently my app can't compile if these configurations use a version greater than Android SDK 31

Possible implementation

No response

Code sample

buildscript {
    // The Android Gradle plugin is only required when opening the android folder stand-alone.
    // This avoids unnecessary downloads and potential conflicts when the library is included as a
    // module dependency in an application project.
    if (project == rootProject) {
        repositories {
            google()
            mavenCentral()
        }
        dependencies {
            classpath("com.android.tools.build:gradle:7.2.2")
        }
    }
}

apply plugin: "com.android.library"

android {
    compileSdkVersion safeExtGet("compileSdkVersion", 33)
    buildToolsVersion safeExtGet("buildToolsVersion", "33.0.0")
    defaultConfig {
        minSdkVersion safeExtGet("minSdkVersion", 21)
        targetSdkVersion safeExtGet("targetSdkVersion", 33)
    }
    lintOptions {
        abortOnError false
    }
}
zoontek commented 2 years ago

Something might be wrong in your app config.

safeExtGet check if a variable is defined and provides a fallback in case it's not.

This pattern is used by nearly every RN library and the fallback is often something even older.

Examples:

As there is currently no dependency on anything added in v33 for this library, I don't think this is needed.

But out of curiosity, what's your exact error? Because we don't provided it.

ernest0vm commented 2 years ago

I'm sorry, it was an error that was generated when I wanted to compile and the error mentioned that it could not find compatibility with the buildToolsVersion 33.0.0, so I changed them to version 31.0.0 and it worked fine, at this moment I changed it again to the version 33.0.0 and compiled without problem, I think it was my problem