Whenever I build the React application, it automatically selects version 8.2.1, which is not specified, and also picks the latest SDK version. As a result, the build keeps failing.
Android gradle plugin: 8.2.1 Gradle: 8.0.1 Warning: SDK processing.
This version only understands SDK XML versions up to 3 but an SDK XML
file of version 4 was encountered. This can happen if you use versions
of Android Studio and the command-line tools that were released at
different times. WARNING: The specified Android SDK Build Tools
version (33.0.0) is ignored, as it is below the minimum supported
version (34.0.0) for Android Gradle Plugin 8.2.1. Android SDK Build
Tools 34.0.0 will be used.
/android/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
}
}
gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-8.0.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists