【发布时间】:2021-07-08 20:19:22
【问题描述】:
我正在尝试运行在您创建新应用时生成的“hello world”应用。这是我尝试在 Visual Studio Code 中运行时不断遇到的错误:
* What went wrong:
A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest').
> File 'G:\Projects\flutter\brew_crew4\build\app\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist.
* 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 3m 39s
Exception: Gradle task assembleDebug failed with exit code 1
我正在使用 JDK 1.8.291 和 Gradle 7.0
截至本文发布之日(2.2.3),我正在运行最新版本的 Flutter。这是“颤振医生”的输出。没有任何问题!在我的装有 saem 版本的 Gradle 和 JDK 的 Mac 上,我可以毫无问题地运行 Flutter 应用程序!
• Flutter version 2.2.3 at d:\WebProjects\utils\flutter
• Framework revision f4abaa0735 (7 days ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at D:\Android\Sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = D:\Android\Sdk
• Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
• Visual Studio at g:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.9.31205.134
• Windows 10 SDK version 10.0.19041.0
[✓] Android Studio
• Android Studio at D:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
???? https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
???? https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = D:\Program Files\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
[✓] VS Code (version 1.57.1)
• VS Code at C:\Users\User\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.24.0
[✓] Connected device (4 available)
• Android SDK built for x86 64 (mobile) • emulator-5554 • android-x64 • Android 10 (API 29) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version
10.0.19043.1052]
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.124
• Edge (web) • edge • web-javascript • Microsoft Edge 91.0.864.64
• No issues found!
我已尝试重新安装 JDK 和 Android Studio 两次。
更新:这是我的 build.gradle 文件的内容:
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.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
}
非常感谢任何帮助!
【问题讨论】:
-
向我们展示文件 build.gradle。
-
创建另一个新项目是否仍然存在同样的问题?
-
@eihon 是的,如果创建另一个新项目也会出现同样的错误
-
我已经更新了我的问题以包含 build.gradle 内容@filipe-piletti-plucenio
-
你能用堆栈跟踪选项分享错误消息吗?我不认为这是 gradle 的问题