我无法在android studio模拟器上运行flutter应用程序

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

我在 androidstudio 模拟器上运行 flutter 应用程序时遇到问题

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not find gradle-7.3.0.jar (com.android.tools.build:gradle:7.3.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.jar
   > Could not find builder-7.3.0.jar (com.android.tools.build:builder:7.3.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/7.3.0/builder-7.3.0.jar
   > Could not find bundletool-1.9.0.jar (com.android.tools.build:bundletool:1.9.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/1.9.0/bundletool-1.9.0.jar
   > Could not find protos-30.3.0.jar (com.android.tools.analytics-library:protos:30.3.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/30.3.0/protos-30.3.0.jar

* 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 1s
Exception: Gradle task assembleDebug failed with exit code 1

我尝试更新java,但它给了我一个错误

java android flutter android-studio android-emulator
1个回答
0
投票

试试这些

检查您的

Gradle plugin
版本和项目中使用的
Kotlin
版本是否相互兼容。

还有

检查您的

Java SDK
是否与
Gradle plugin
版本兼容

如果没有相应地更改

Java SDK
Gradle plugin

然后运行 Gradle 构建。

我希望这能解决您的问题。

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