无法确定任务 ':app:compileDebugJavaWithJavac' 对 mint 的依赖关系

时间:2021-06-17 16:59:38

标签: android linux flutter linux-mint

我正在使用 Linux Mint 20.1 并尝试在我的 android 手机上运行 flutter 应用程序 (v 2.2.2) 我通过终端安装了 jdk 和 android sdk,但它给了我这个

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

我已经接受了许可证,手动安装了所需的 pacakages,但徒劳无功,它每次都给我相同的味精

1 个答案:

答案 0 :(得分:0)

打开右上角的android studio你会看到这些选项 选择最后一个 SDK 管理器

enter image description here

你会得到这个对话框

SDK Manager 点击 SDK 工具标签

SDK TOOLS

现在在这里检查您是否安装或更新了所有这些软件包。如果您不是在构建 linux 应用程序,请忽略 Cmake。

这应该可以解决您在 linux mint 20.1 中的问题