【问题标题】:Flutter Emulator Error | Failed to find Platform SDK with path: platforms;android-RFlutter 模拟器错误 |无法找到具有路径的平台 SDK:平台;android-R
【发布时间】:2020-11-12 21:39:39
【问题描述】:

我在 IOS 模拟器中编译我的应用程序,它运行 find,当我尝试在 android 模拟器或 android 手机上运行它时,它给了我这个错误。 我已经安装了所有的 SDK,但我仍然有这个问题。

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app_settings:compileDebugAidl'.
> Failed to find Platform SDK with path: platforms;android-R

我正在发布我的构建 gradle 文件和 sdk 管理器的屏幕截图: build gradle file

sdk tools

【问题讨论】:

  • 项目结构有什么问题吗?
  • 你真的安装了android SDK吗?在 AS 升级后,我发现有些东西丢失了 - 删除软件包并重新安装它们有时会有所帮助。

标签: android flutter android-fragments sdk android-gradle-plugin


【解决方案1】:
    subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"

    project.evaluationDependsOn(':app')

    afterEvaluate {project ->
        if (project.hasProperty("android") && project.property("android").compileSdkVersion.equals("android-R")) {
            android {
                compileSdkVersion 30
            }
        }
    }
}

【讨论】:

    猜你喜欢
    • 2020-10-03
    • 2018-12-13
    • 2019-08-11
    • 1970-01-01
    • 1970-01-01
    • 2016-06-26
    • 2018-04-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多