0

I'm using Linux Mint 20.1 and trying to run a flutter app (v 2.2.2) to my android phone I installed the jdk and android sdk through terminal but it gives me this

FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     platforms;android-30 Android SDK Platform 30                       
     build-tools;29.0.2 Android SDK Build-Tools 29.0.2                  
  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: /usr/lib/android-sdk                               
                                                                        
* 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 1s                                                      
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                      2,468ms
Exception: Gradle task assembleDebug failed with exit code 1

I've accepted the licenses, installed the required pacakages manually but all in vain it gives me the same msg each time

James Z
  • 12,209
  • 10
  • 24
  • 44
Aybak3k
  • 196
  • 1
  • 11
  • 2
    Does this answer your question? [flutter error Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'](https://stackoverflow.com/questions/59476081/flutter-error-could-not-determine-the-dependencies-of-task-appcompiledebugjav) – Mayur Agarwal Jun 17 '21 at 17:10

1 Answers1

0

Open the android studio in the top right corner you will see these option Select the Last one SDK manager

enter image description here

You will get this dialog

SDK Manager click on SDK tool tab

SDK TOOLS

Now here check if you have all these packages installed or updated . Ignore Cmake if you are not building linux applications.

This should solve your problem in linux mint 20.1

Ashutosh Patole
  • 926
  • 1
  • 7
  • 23