首页 > 解决方案 > 更改 build.gradle 文件上的 applicationId 后出现错误

问题描述

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

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new **FileNotFoundException**("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

我收到 Properties() 类和 FileNotFoundException 的错误。尝试更改我的应用程序 ID 后出现此错误。我该如何解决这个问题。

标签: androidandroid-studioflutterdart

解决方案


local.propertiesandroid文件夹下应该有一个文件。


推荐阅读