'flutter: Multiple projects in this build have project directory
I'm developing a flutter application on Mac, the app runs ok on ios when I try to run it on an Android device, it pops out:
FAILURE: Build failed with an exception.
* What went wrong:
Multiple projects in this build have project directory '/Users/liuqishu/Downloads/scambio/android': [:scambio, :]
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 661ms
Running Gradle task 'assembleRelease'... 3.5s
Gradle task assembly release failed with exit code 1
Technically, there is only one project in my project directory which is "scambio", but I noticed that in the log [:scambio, :]
, there is a project with an empty name?
What should I do to remove this empty project from my Gradle?
my build.gradle
file:
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
what's is my project_name/android
folder:
- app/build.gradle
- gradle/wrapper
- build.gradle
- gradle.properties
- settings.gradle
- gradlew
- gradlew.bat
- local.properties
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|