Вот ошибка:
Код: Выделить всё
Flutter assets will be downloaded from https://mirrors.tuna.tsinghua.edu.cn/git/flutter. Make sure you trust this source!
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
FAILURE: Build failed with an exception.
* Where:
Settings file 'C:\Users\me\Desktop\workspace\flutter_application_1\android\settings.gradle' line: 20
* What went wrong:
Error resolving plugin [id: 'dev.flutter.flutter-plugin-loader', version: '1.0.0']
> Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by settings file 'settings.gradle'
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 11s
Error: Gradle task assembleDebug failed with exit code 1
Exited (1).
Код: Выделить всё
Flutter 3.24.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision dec2ee5c1f (3 weeks ago) • 2024-11-13 11:13:06 -0800
Engine • revision a18df97ca5
Tools • Dart 3.5.4 • DevTools 2.37.3
для сетевого ускорения я настроил env следующим образом:
р>
Код: Выделить всё
FLUTTER_STORAGE_BASE_URL:https://mirrors.tuna.tsinghua.edu.cn/git/flutter
PUB_HOSTED_URL:https://pub.flutter-io.cn
Код: Выделить всё
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
include ":app"
Код: Выделить всё
Edition Windows 11 Pro
Version 24H2
Installed on 12/7/2024
OS build 26100.2314
Experience Windows Feature Experience Pack 1000.26100.32.0
Кстати, я могу без проблем запустить его на рабочем столе Windows и в браузере MS Edge.
попробуйте запустить его на устройствах Android, но безуспешно.
Эмулятор предоставляется студией Android.
то же самое, что и APK, так что я думаю, дело не в эмуляторе.>
Подробнее здесь: https://stackoverflow.com/questions/792 ... sitories-b