当我试图在刚刚使用flutter run创建的项目中执行flutter create <project-name>时,我遇到了这样的错误
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时出错了。
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。
发布于 2022-07-12 10:38:33
要解决这个问题,只需迁移到Ubuntu或Windows即可。这肯定能解决这个问题
https://stackoverflow.com/questions/72857965
复制相似问题