首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Flutter未能安装以下sdk组件

Flutter未能安装以下sdk组件
EN

Stack Overflow用户
提问于 2022-07-04 13:59:31
回答 1查看 256关注 0票数 0

当我试图在刚刚使用flutter run创建的项目中执行flutter create <project-name>时,我遇到了这样的错误

代码语言:javascript
复制
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following SDK components:
      platforms;android-31 Android SDK Platform 31
  Install the missing components using the SDK manager in Android Studio.

我已经通过将compileSdkVersion flutter.complieSdkVersion更改为compileSdkVersion 33来修复它。

但是现在我在尝试使用共享首选项包执行flutter run时出错了。

代码语言:javascript
复制
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':shared_preferences_android:compileDebugAidl'.
> Failed to install the following SDK components:
      platforms;android-31 Android SDK Platform 31
  Install the missing components using the SDK manager in Android Studio.

问题是我已经安装了android 33.0.0、31.0.0和Android中的所有30个版本,所以我还应该安装什么.

另外,当我做flutter doctor --android-licences并接受它时,flutter说有些许可证仍然不被接受。我在使用流行音乐!_OS 20.04。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-07-12 10:38:33

要解决这个问题,只需迁移到Ubuntu或Windows即可。这肯定能解决这个问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72857965

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档