Вот ошибка, которая у меня возникла:
*Не удалось открыть Кэш общего класса настроек для файла настроек «C:\Users\Benj\projects\TikTokClone\android\settings.gradle» (C:\Users\Benj.gradle\caches\7.5\scripts\e34934ll5fugwo6b0s7f5a19r).
ОШИБКА! исключение на этапе «семантического анализа» в исходном модуле «BuildScript». Неподдерживаемый файл класса, основная версия 64*
Вот мой Android /build.gradle:
Код: Выделить всё
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:7.0.3")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
Это мой android/gradle/wrapper/gradle-wrapper.properties< /p>
Код: Выделить всё
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Мой android/setting.gradle
Код: Выделить всё
rootProject.name = 'TikTok'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
Подробнее здесь: https://stackoverflow.com/questions/785 ... r-settings