我在 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,但它给了我一个错误
试试这些
检查您的
Gradle plugin
版本和项目中使用的Kotlin
版本是否相互兼容。
还有
检查您的
Java SDK
是否与 Gradle plugin
版本兼容
如果没有相应地更改
Java SDK
或Gradle plugin
然后运行 Gradle 构建。
我希望这能解决您的问题。