简体   繁体   English

在 vscode 中运行 flutter 应用程序并收到此错误无法确定任务':app:compileDebugJavaWithJavac'的依赖关系

[英]Running flutter app in vscode and get this error Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'

i'm currently facing the problem in running my flutter app in physical device(phone).我目前在物理设备(电话)中运行我的 flutter 应用程序时遇到问题。 i'm using android studio 4 and vscode.我正在使用 android studio 4 和 vscode。 The error message is below.错误消息如下。

Launching lib\main.dart on TECNO B1f in debug mode...
lib\main.dart:1

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to find target with hash string 'android-29' in: C:\Users\Kitsson\AppData\Local\Android\sdk

* 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 7m 8s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

I would suggest 4 methods to solve this issue, try one after another until it works for you:我会建议 4 种方法来解决这个问题,一个接一个地尝试,直到它适合你:

  1. Open terminal - run flutter doctor --android-licenses .打开终端 - 运行flutter doctor --android-licenses Just accept all and it should work, if it dosen't then skip to next step.只需接受所有内容,它应该可以工作,如果没有,则跳到下一步。

  2. adding buildToolsVersion in android => app => build.gradleandroid => app => build.gradle中添加buildToolsVersion

android { compileSdkVersion 29 buildToolsVersion "29.0.0"... ... }

  1. This often happens when you have something in your dependency that require internet like firebase.当您的依赖项中有一些需要 Internet 的东西时,通常会发生这种情况,例如 firebase。 Just turn on your internet or wifi .只需打开您的互联网或无线网络

  2. If none of them works then turn off developer option and turn it on again by pressing build number 7 times, this will revoke all usb debugging autherisation and ask whether to trust your developing machine, press yes and you will be good to go如果它们都不起作用,则关闭开发人员选项并通过按内部版本号再次打开它 7 次,这将撤销所有 usb 调试授权并询问是否信任您的开发机器,按是,您会很好 go

暂无
暂无

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

相关问题 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Flutter - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' - Flutter 无法确定 flutter 中任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' in flutter 错误=>无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - Error=> Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。 颤振应用 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. flutter application 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。 flutter 上的问题 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. problem on flutter 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。 (一个信号) - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. (OneSignal) flutter 无法确定依赖项 ':app:compileDebugJavaWithJavac' - flutter Could not determine the dependencies ':app:compileDebugJavaWithJavac' 如何解决无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - Android - How to solve Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' - Android 无法确定 android 工作室中任务“:app:compileDebugJavaWithJavac”的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' in android studio 我无法执行 npx react-native run-android,Java 错误; 无法确定任务“:app:compileDebugJavaWithJavac”的依赖关系。 LINUX - I can't do npx react-native run-android, Java error; Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. LINUX
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM