【发布时间】:2020-07-17 00:27:16
【问题描述】:
我想在设备上运行我的 hello world 应用,但是当我运行这个应用时,我发现同步错误。
我不知道如何解决它。我已经完成了启动应用程序的所有工作,例如在系统变量中下载 SDK 或 PATH,但它在最后一步不起作用,我的颤振 SDK 是它的最后一个版本。
这是我的 flutter-tools/flutter.gradle 文件(默认)
.
.
.
.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
.
.
.
这是日志
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
> Could not find fragment.jar (androidx.fragment:fragment:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.0.0/fragment-1.0.0.jar
> Could not find lifecycle-runtime.jar (androidx.lifecycle:lifecycle-runtime:2.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.0.0/lifecycle-runtime-2.0.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 50s
Finished with error: Gradle task assembleDebug failed with exit code 1
【问题讨论】:
-
和颤振医生表明一切都很好
标签: android android-studio flutter gradle dart