Reputation: 342
I am trying to run Android project in an AVD Manager. 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.
Any help!
Upvotes: 2
Views: 18242
Reputation: 114
Sometimes you'll face some Flutter/Android projects, which have a "./android/local.properties" file or similar. Be aware your "./android/local.properties"'s content is correct. It keeps some importante values including secrets, working like an ".env".
Ask your colleagues or the former devs for that content, then put it into that file and good coding!
Upvotes: 0
Reputation: 49
Try to execute the following command inside your project directory:
./gradlew clean
and re-run it in the studio.
Upvotes: 0