Ни одна локально установленная цепочка инструментов не соответствует MacJAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Ни одна локально установленная цепочка инструментов не соответствует Mac

Сообщение Anonymous »

У меня есть флаттер-приложение. Все работало нормально, пока я не включил пакет Social_share, и он начал давать сбой, и что интересно, он начал давать сбой в пакетах, у которых раньше не было проблем. Теперь всякий раз, когда я пытаюсь запустить на Android, у меня возникает эта проблема

Код: Выделить всё

Execution failed for task ':audioplayers_android:compileDebugJavaWithJavac'.
> Error while evaluating property 'javaCompiler' of task ':audioplayers_android:compileDebugJavaWithJavac'.
> Failed to calculate the value of task ':audioplayers_android:compileDebugJavaWithJavac' property 'javaCompiler'.
> No matching toolchains found for requested specification: {languageVersion=8, vendor=any, implementation=vendor-specific}.
> No locally installed toolchains match (see https://docs.gradle.org/8.0/userguide/toolchains.html#sec:auto_detection) and toolchain download repositories have not been configured (see https://docs.gradle.org/8.0/userguide/toolchains.html#sub:download_repositories).
Вот мой build.gradle уровня проекта

Код: Выделить всё

buildscript {
ext.kotlin_version = '1.9.21'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
// START: FlutterFire Configuration
classpath 'com.google.gms:google-services:4.4.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
// END: FlutterFire Configuration
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

plugins {
// Apply the java plugin to add support for Java
id 'java'
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}

allprojects {
repositories {
google()
mavenCentral()
}
tasks.withType(JavaCompile) {
javaCompiler = javaToolchains.compilerFor {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
Это build.gradle уровня приложения

Код: Выделить всё

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found.  Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
// START: FlutterFire Configuration
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
// END: FlutterFire Configuration
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 34 //localProperties.getProperty("flutter.compileSdkVersion")
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
applicationId "com.rlabs.wordera"
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}

flutter {
source '../..'
}

dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// Import the BoM for the Firebase platform
implementation(platform("com.google.firebase:firebase-bom:32.7.0"))

// Add the dependency for the Firebase Authentication library
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation("com.google.firebase:firebase-auth")

// Also add the dependency for the Google Play services library and specify its version
implementation("com.google.android.gms:play-services-auth:20.7.0")
}
Я переустановил Java, Android Studio, перепрошил чат-gpt, codepilot и bard, ничего не помогло, ха-ха. В чем здесь проблема?

Подробнее здесь: https://stackoverflow.com/questions/776 ... -match-mac
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»