When I run Flutter, I encounter an error related to my Android directories.
FAILURE: Build failed with an exception.
-
Where:
Settings file ‘C:Userssubasflutter_projectsStablePayMobilenear_pay_appandroidsettings.gradle’ line: 11 -
What went wrong:
A problem occurred evaluating settings ‘android’.
Illegal char <“> at index 0: “This is a generated file; do not edit or check into version control.”
My line 11 is this:
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
Here is the rest of my code:
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins-dependencies')
if (pluginsFile.exists()) {
plugins.load(new FileInputStream(pluginsFile))
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
rootProject.name = 'app'