简体   繁体   English

无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。 当我在模拟器中运行 flutter 项目时出现这些错误

[英]Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. These error comes when I run flutter project in emulator

I create a empty flutter application and I got this error when I run this in android emulator.我创建了一个空的 flutter 应用程序,当我在 android 模拟器中运行它时出现此错误。 I already installed java, AD (4.1),git but don't know what happens.我已经安装了 java, AD (4.1),git 但不知道会发生什么。 If anyone has idea let me know.如果有人有想法,请告诉我。 Thanks:)谢谢:)

error log错误日志

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following SDK components:
      build-tools;28.0.3 Android SDK Build-Tools 28.0.3
      platforms;android-29 Android SDK Platform 29
  Install the missing components using the SDK manager in Android Studio.


* 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

flutter doctor full summary flutter博士全总结

    PS F:\Flutter\flutter_application_1> flutter doctor -v [√] Flutter (Channel stable, 2.0.0, on Microsoft Windows [Version 10.0.19042.804], locale en-US)
    • Flutter version 2.0.0 at C:\src\flutter
    • Framework revision 60bd88df91 (16 hours ago), 2021-03-03 09:13:17 -0800
    • Engine revision 40441def69
    • Dart version 2.12.0

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) 
    • Android SDK at C:\Users\vaagm\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java       
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.53.2)
    • VS Code at C:\Users\vaagm\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.20.0

[√] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 5.1.1 (API 22) (emulator)
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 88.0.4324.190
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 88.0.705.81

• No issues found!

After some searching, according to this question , you need to accept android licenses.经过一番搜索,根据这个问题,您需要接受 android 许可证。 Check this out and let us know your results:) Hope it will help看看这个,让我们知道你的结果:)希望它会有所帮助

The solution is there in the error message.解决方案在错误消息中。 you need to install following SDK components: build-tools;您需要安装以下 SDK 组件:构建工具; 28.0.3 Android SDK Build-Tools 28.0.3 platforms; 28.0.3 Android SDK 构建工具 28.0.3 平台; android-29 Android SDK Platform 29 Install the missing components using the SDK manager in Android Studio. android-29 Android SDK 平台 29 使用 ZE84E3C5E54C0AB3D375D660B3F896F6AZ 管理器安装缺失的组件

Go to File>settings>Appearance & Behaviour>System settings>Android SDK> And install the mentioned sdk build tools,platform. Go 到文件>设置>外观和行为>系统设置>Android SDK>并安装提到的sdk构建工具,平台。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 flutter run 无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - flutter run Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 无法确定 flutter 中任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' in flutter 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。[Flutter] - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.[Flutter] 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Flutter - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' - Flutter Flutter 构建错误:无法确定任务':app:compileDebugJavaWithJavac的依赖关系 - Flutter Build Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac 无法确定任务 ':app:compileDebugJavaWithJavac' Flutter 的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' Flutter Flutter - 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Flutter - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' flutter 错误无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - flutter error Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' Flutter 通知 OneSignal - 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Flutter Notification OneSignal - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 无法确定任务':app:compileDebugJavaWithJavac Flutter VS的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac Flutter VS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM