Home > Blockchain >  Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. flutter app
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. flutter app

Time:07-12

when i start to emulate to my android phone and active developer mode and USB debugging ii got these messages and i tried some things but it didn't workenter image description here

enter image description here

enter image description here

enter image description here

CodePudding user response:

Based on the images you posted and the error shown you have not accepted Android SDK Licenses (As per your image)

Run flutter doctor --android-licenses in Terminal

You will be prompted to accept the licenses in the terminal.

Edit: It looks like as well, you do not have the CMD Line tools installed.

Please also run c:\Users\USERNAME\AppData\Local\Android\Sdk --install "cmdline-tools;latest" Make sure to replace USERNAME with your name.

If you have trouble installing cmdline tools from Terminal refer to this post: cmdline-tools missing

After you have accepted the licenses and installed cmdline tools try running it again. Happy Coding

CodePudding user response:

Follow these steps for installing command line tools-

Open command like and enter - <path to android sdkmanager> --install "cmdline-tools;latest"

example,

~/Library/Android/sdk/tools/bin/sdkmanager --install "cmdline-tools;latest"

OR

Install Android SDK Command-line Tools in Android Studio:

Preferences → Appearance & Behavior → System Settings → Android SDK → SDK Tools → Android SDK Command-line Tools (latest)

Follow these steps for android licenses -

Run this on command line - flutter doctor --android-licenses

Follow these steps for installing Visual Studio -

Just click on the link to download the setup, while the installation process you'll also have to install Desktop development with C workload. Don't worry you'll just see an option while installation process right away.

  • Related