Мое приложение работает правильно в последней версии Flutter 3.24.5, но когда я создаю сборку выпуска, у меня возникает ошибка. как я могу это исправить?
"/Users/imac/Documents/flutter_sdk/flutter 3.24.5/bin/flutter" --no-color build apk
Running Gradle task 'assembleRelease'...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/imac/mobile-app-flutter/android/app/build.gradle' line: 2
* What went wrong:
Plugin [id: 'com.android.application'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
* 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 753ms
Running Gradle task 'assembleRelease'... 1,319ms
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1
Мое приложение работает правильно в последней версии Flutter 3.24.5, но когда я создаю сборку выпуска, у меня возникает ошибка. как я могу это исправить? [code]"/Users/imac/Documents/flutter_sdk/flutter 3.24.5/bin/flutter" --no-color build apk
Running Gradle task 'assembleRelease'... You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply
* What went wrong: Plugin [id: 'com.android.application'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Plugin Repositories (plugin dependency must include a version number for this source)
* 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 753ms Running Gradle task 'assembleRelease'... 1,319ms Gradle task assembleRelease failed with exit code 1 Process finished with exit code 1 [/code] вот мои настройки.gradle [code]include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties") def properties = new Properties()
def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" [/code] Я получил ошибку выше. Я также пытаюсь изменить версию Kotlin, но все равно получаю ту же ошибку. если у кого-нибудь есть идеи, помогите мне решить.