android-studioflutterdart

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. problem on flutter


FAILURE: Build failed with an exception.

Failed to install the following Android SDK packages as some licences have not been accepted. build-tools;28.0.3 Android SDK Build-Tools 28.0.3 platforms;android-28 Android SDK Platform 28 To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

Using Android SDK: C:\Users\emre\AppData\Local\Android\sdk

BUILD FAILED in 11s

FAILURE: Build failed with an exception.

C:\Users\emre.gradle\caches\5.6.2\file-changes\last-build.bin (Access is denied)

BUILD FAILED in 11s Exception: Gradle task assembleDebug failed with exit code 1


Solution

  • Apparently you should accept the license,so in your command promp:

    cd /d "%ANDROID_SDK_ROOT%/tools/bin"
    

    and then

    sdkmanager --licenses
    

    just accept the license and the error should goes away.