简体   繁体   English

如何解决无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - Android

[英]How to solve Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' - Android

I am trying to run Android project in an AVD Manager.我正在尝试在 AVD 管理器中运行 Android 项目。 When the program compiles it throws an exception.程序编译时会抛出异常。

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
    at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:69)
    at org.gradle.execution.plan.TaskDependencyResolver.resolveDependenciesFor(TaskDependencyResolver.java:46)
    at org.gradle.execution.plan.LocalTaskNode.getDependencies(LocalTaskNode.java:160)
    at org.gradle.execution.plan.LocalTaskNode.resolveDependencies(LocalTaskNode.java:128)
    at org.gradle.execution.plan.DefaultExecutionPlan.doAddNodes(DefaultExecutionPlan.java:163)
    at org.gradle.execution.plan.DefaultExecutionPlan.addEntryTasks(DefaultExecutionPlan.java:133)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.addEntryTasks(DefaultTaskExecutionGraph.java:147)
    at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:49)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:55)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter.java:26)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.java:63)
    at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:45)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:55)....
Caused by: java.lang.IllegalStateException: Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.
    at com.android.builder.sdk.DefaultSdkLoader.getTargetInfo(DefaultSdkLoader.java:183)
    at com.android.build.gradle.internal.SdkHandler.initTarget(SdkHandler.java:113)
    ... 137 more

I have tried several solutions for a workaround.我已经尝试了几种解决方案来解决问题。 I have tried to change CompledSDK, TargetSDK and BuildTools to 31, 30 and 29 but none of them worked for me.我尝试将 CompledSDK、TargetSDK 和 BuildTools 更改为 31、30 和 29,但它们都不适合我。

Any help!任何帮助!

Try to execute the following command inside your project directory:尝试在项目目录中执行以下命令:

./gradlew clean./gradle assembleRelease ./gradlew clean./gradle assembleRelease

and re-run it in the studio.并在工作室中重新运行它。

暂无
暂无

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

相关问题 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。 在电容 android - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. in capacitor android 错误:无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 无法确定任务“:app:compileDebugJavaWithJavac”的依赖关系。 在科尔多瓦有问题 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. having issue's in Cordova 我无法执行 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 Gradle构建成功,但出现运行时错误错误:无法确定任务':app:compileDebugJavaWithJavac'的依存关系 - Gradle build successfully but Getting Runtime Error Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 如何解决Android Studio中的错误“包R不存在”和“任务执行失败:” app.compileDebugJavaWithJavac”? - How could I solve errors 'Package R doesn't exist' and 'Execution failed for task“:app.compileDebugJavaWithJavac” ' errors in android studio? 无法解决Android错误:任务':app:compileDebugJavaWithJavac'的执行失败 - Cannot solve Android Error:Execution failed for task ':app:compileDebugJavaWithJavac' 错误:无法确定任务 ':app:preDebugBuild' 的依赖关系 - Error:Could not determine the dependencies of task ':app:preDebugBuild' 无法确定任务 ':app:processDebugManifest' 的依赖关系 - Could not determine the dependencies of task ':app:processDebugManifest' 无法确定任务 ':app:lintVitalRelease' 错误对最近 android 升级 3.6.1 的依赖关系 - Could not determine the dependencies of task ':app:lintVitalRelease' error on recent android upgrade 3.6.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM