解析插件时出错[id:'dev.flutter.flutter-plugin-loader',版本:'1.0.2']

问题描述 投票:0回答:1

enter image description here

flutter项目如何解决这个问题?

我希望在 Android 上运行它。

文本格式错误(上图截图):

Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/sony/AndroidStudioProjects/userapp/android/settings.gradle' line: 24

* What went wrong:
Error resolving plugin [id: 'dev.flutter.flutter-plugin-loader', version: '1.0.2']
> A problem occurred configuring project ':gradle'.
   > Could not read workspace metadata from /Users/sony/.gradle/caches/8.10/kotlin-dsl/accessors/988977859d9b6b0195278c1d04431d6c/metadata.bin

* 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 644ms
Error: Gradle task assembleDebug failed with exit code 1
android flutter kotlin gradle android-gradle-plugin
1个回答
0
投票

首先更新settings.gradle文件中的com.android.application id“com.android.application”版本“8.3.2”适用 false

之后进入包装器文件夹内的 gradle 文件夹,您会发现 gradle-wrapper.properties 添加以下内容:- distributionUrl=https://services.gradle.org/distributions/gradle-8.4-all.zip

然后重新启动IDE

我希望这会起作用

© www.soinside.com 2019 - 2024. All rights reserved.