Home > Enterprise >  Error: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. when
Error: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. when

Time:09-17

The error happend after upgrading flutter to latest version 2.5.0 along side all of my packages and gradle to a newer version

full error message:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to find Build Tools revision 29.0.2

* 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 6s
Exception: Gradle task assembleDebug failed with exit code 1

gradle dependencies in app level:

implementation 'com.android.support:multidex:2.0.1'
    implementation 'com.google.firebase:firebase-analytics'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.browser:browser:1.3.0'

gradle dependencies in project level:

classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.0'

I have also made sure that my emulator is connected to internet and that I have accepted android sdk license

CodePudding user response:

turns out the error was because my java version jdk was old and the issue was fixed by upgrading it to Java 13

  • Related