Запуск задачи Gradle 'assembleDebug'...
ОШИБКА: сборка завершилась с ошибкой с исключением.
- Что пошло не так:
Не удалось открыть кэш общих классов настроек для файла настроек 'E:\z\grocery-store\android\settings. gradle' (C:\Users\MI.gradle\caches\7.0.1\scripts\c22q10f3o8aakfcab7d9nxrw4).
- < li>Попробуйте:
Запустите с параметром --stacktrace, чтобы получить трассировку стека. Запустите с опцией --info или --debug, чтобы получить больше результатов журнала. Запустите --scan, чтобы получить полную информацию. - Получите дополнительную помощь на https://help.gradle.org
Исключение: ошибка сборки задачи GradleDebug с кодом завершения 1
в настоящее время использую flutter sdk 2.5.2 и java 17.
я хочу запустить этот код без ошибок.
вот мое приложение/build.gradle
Код: Выделить всё
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
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'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.grocery"
minSdkVersion 24
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-messaging:21.0.1'
}
apply plugin: 'com.google.gms.google-services'
Код: Выделить всё
buildscript {
ext.kotlin_version = '1.5.10'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
пожалуйста, мне нужно решение
Подробнее здесь: https://stackoverflow.com/questions/787 ... ors-builds
Мобильная версия