【问题标题】:Could not set unknown property 'localProperties' for project ':app' of type org.gradle.api.Project无法为 org.gradle.api.Project 类型的项目“:app”设置未知属性“localProperties”
【发布时间】:2019-07-26 23:46:07
【问题描述】:

您好,将 Android Studio 升级到 3.3.2 后,每次运行应用程序时都会出现此错误:

Could not set unknown property 'localProperties' for project ':app' of type org.gradle.api.Project

我的build.gradle

testInstrumentationRunnerdef localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

【问题讨论】:

    标签: android gradle flutter android-gradle-plugin


    【解决方案1】:

    我通过调用 flutter create . 重新创建 Android 文件来解决此问题,从而成功构建。

    【讨论】:

      猜你喜欢
      • 2023-03-29
      • 1970-01-01
      • 1970-01-01
      • 2023-01-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-21
      相关资源
      最近更新 更多