FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':qr_code_scanner'.
> Could not resolve all artifacts for configuration ':qr_code_scanner:classpath'.
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
Required by:
project :qr_code_scanner
> The consumer was configured to find a runtime of a component compatible with Java 11, packaged as a jar, and its dependencies declared externally. However we cannot choose between the following variants of org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10:
- gradle70JavadocElements
- gradle70RuntimeElements
- gradle70SourcesElements
- javadocElements
- runtimeElementsWithFixedAttribute
- sourcesElements
All of them match the consumer attributes:
- Variant 'gradle70JavadocElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component, and its dependencies declared externally:
- Unmatched attributes:
- Provides documentation but the consumer didn't ask for it
- Provides javadocs but the consumer didn't ask for it
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Provides attribute 'org.gradle.plugin.api-version' with value '7.0' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it
- Variant 'gradle70RuntimeElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component compatible with Java 8, packaged as a jar, and its dependencies declared externally:
- Unmatched attributes:
- Provides a library but the consumer didn't ask for it
- Provides attribute 'org.gradle.jvm.environment' with value 'standard-jvm' but the consumer didn't ask for it
- Provides attribute 'org.gradle.plugin.api-version' with value '7.0' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it
- Variant 'gradle70SourcesElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component, and its dependencies declared externally:
- Unmatched attributes:
- Provides documentation but the consumer didn't ask for it
- Provides sources but the consumer didn't ask for it
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Provides attribute 'org.gradle.plugin.api-version' with value '7.0' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it
- Variant 'javadocElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component, and its dependencies declared externally:
- Unmatched attributes:
- Provides documentation but the consumer didn't ask for it
- Provides javadocs but the consumer didn't ask for it
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Provides release status but the consumer didn't ask for it
- Variant 'runtimeElementsWithFixedAttribute' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component compatible with Java 8, packaged as a jar, and its dependencies declared externally:
- Unmatched attributes:
- Provides a library but the consumer didn't ask for it
- Provides attribute 'org.gradle.jvm.environment' with value 'standard-jvm' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it
- Variant 'sourcesElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component, and its dependencies declared externally:
- Unmatched attributes:
- Provides documentation but the consumer didn't ask for it
- Provides sources but the consumer didn't ask for it
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Provides release status but the consumer didn't ask for it
The following variants were also considered but didn't match the requested attributes:
- Variant 'apiElementsWithFixedAttribute' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a component compatible with Java 8, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component and the consumer needed a runtime of a component
- Variant 'gradle70ApiElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a component compatible with Java 8, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component and the consumer needed a runtime of a component
> Failed to notify project evaluation listener.
> Could not get unknown property 'android' for project ':qr_code_scanner' of type org.gradle.api.Project.
> Could not get unknown property 'android' for project ':qr_code_scanner' of type org.gradle.api.Project.
Я не понимаю, в чем проблема. Любая помощь будет очень признательна
файл Gradle
[√] Flutter (Channel stable, 3.0.4, on Microsoft Windows [Version 10.0.19044.1889], locale en-us)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.67.0)
[√] Connected device (3 available)
[√] HTTP Host Availability
Я пробовал изменить версии Kotlin вручную, но это не сработало, также попробовал собрать приложение с чистой рабочей станции и получил ту же ошибку, уменьшил версию сканера qr с 4.0 до 1.0, но безрезультатно
[b]Не могу обойти эту ошибку после обновления версии флаттера до 3.0.4. с версии 2.10[/b] [b]Ошибка[/b] [code]FAILURE: Build failed with an exception.
* What went wrong: A problem occurred configuring project ':qr_code_scanner'. > Could not resolve all artifacts for configuration ':qr_code_scanner:classpath'. > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10. Required by: project :qr_code_scanner > The consumer was configured to find a runtime of a component compatible with Java 11, packaged as a jar, and its dependencies declared externally. However we cannot choose between the following variants of org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10: - gradle70JavadocElements - gradle70RuntimeElements - gradle70SourcesElements - javadocElements - runtimeElementsWithFixedAttribute - sourcesElements All of them match the consumer attributes: - Variant 'gradle70JavadocElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component, and its dependencies declared externally: - Unmatched attributes: - Provides documentation but the consumer didn't ask for it - Provides javadocs but the consumer didn't ask for it - Doesn't say anything about its target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Provides attribute 'org.gradle.plugin.api-version' with value '7.0' but the consumer didn't ask for it - Provides release status but the consumer didn't ask for it - Variant 'gradle70RuntimeElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component compatible with Java 8, packaged as a jar, and its dependencies declared externally: - Unmatched attributes: - Provides a library but the consumer didn't ask for it - Provides attribute 'org.gradle.jvm.environment' with value 'standard-jvm' but the consumer didn't ask for it - Provides attribute 'org.gradle.plugin.api-version' with value '7.0' but the consumer didn't ask for it - Provides release status but the consumer didn't ask for it - Variant 'gradle70SourcesElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component, and its dependencies declared externally: - Unmatched attributes: - Provides documentation but the consumer didn't ask for it - Provides sources but the consumer didn't ask for it - Doesn't say anything about its target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Provides attribute 'org.gradle.plugin.api-version' with value '7.0' but the consumer didn't ask for it - Provides release status but the consumer didn't ask for it - Variant 'javadocElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component, and its dependencies declared externally: - Unmatched attributes: - Provides documentation but the consumer didn't ask for it - Provides javadocs but the consumer didn't ask for it - Doesn't say anything about its target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Provides release status but the consumer didn't ask for it - Variant 'runtimeElementsWithFixedAttribute' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component compatible with Java 8, packaged as a jar, and its dependencies declared externally: - Unmatched attributes: - Provides a library but the consumer didn't ask for it - Provides attribute 'org.gradle.jvm.environment' with value 'standard-jvm' but the consumer didn't ask for it - Provides release status but the consumer didn't ask for it - Variant 'sourcesElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a runtime of a component, and its dependencies declared externally: - Unmatched attributes: - Provides documentation but the consumer didn't ask for it - Provides sources but the consumer didn't ask for it - Doesn't say anything about its target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Provides release status but the consumer didn't ask for it The following variants were also considered but didn't match the requested attributes: - Variant 'apiElementsWithFixedAttribute' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a component compatible with Java 8, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component - Variant 'gradle70ApiElements' capability org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10 declares a component compatible with Java 8, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component > Failed to notify project evaluation listener. > Could not get unknown property 'android' for project ':qr_code_scanner' of type org.gradle.api.Project. > Could not get unknown property 'android' for project ':qr_code_scanner' of type org.gradle.api.Project. [/code] [b]Я не понимаю, в чем проблема. Любая помощь будет очень признательна[/b] файл Gradle [code]buildscript { ext.kotlin_version = '1.5.10' repositories { mavenCentral() google() jcenter() }
allprojects { repositories { google() jcenter() } } [/code] Вывод Flutter Doctor [code][√] Flutter (Channel stable, 3.0.4, on Microsoft Windows [Version 10.0.19044.1889], locale en-us) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [√] Android Studio (version 2021.2) [√] VS Code (version 1.67.0) [√] Connected device (3 available) [√] HTTP Host Availability [/code] Я пробовал изменить версии Kotlin вручную, но это не сработало, также попробовал собрать приложение с чистой рабочей станции и получил ту же ошибку, уменьшил версию сканера qr с 4.0 до 1.0, но безрезультатно
Что пошло не так:
Проблема возникла настройка root project 'Android'. .
не удалось найти com.android.tools.build:gradle:7.4.2.2.
в следующих местоположениях:
- /maven2/com/android/tools/build/gradle/7.4.2/gradle-7.4.2.pom
-...