android/build.gradle
buildscript { ext.safeExtGet = {prop, fallback -> return rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback } repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:7.0.4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.6.10')}" }} def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback} apply plugin: 'com.android.library'apply plugin: 'kotlin-android' android { compileSdkVersion safeExtGet('compileSdkVersion', 31) buildToolsVersion safeExtGet('buildToolsVersion', '31.0.0') defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 21) targetSdkVersion safeExtGet('targetSdkVersion', 31) }} repositories { google() mavenCentral()} dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+'}