Shr*_*rma 7 android ios dart flutter
我正在构建我的应用程序,当构建时发生此错误 -
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:checkDebugManifest' (type 'CheckManifest').
- Type 'CheckManifest' property 'manifest' has @Input annotation used on property of type 'File'.
Reason: A property of type 'File' annotated with @Input cannot determine how to interpret the file.
Possible solutions:
1. Annotate with @InputFile for regular files.
2. Annotate with @InputDirectory for directories.
3. If you want to track the path, return File.absolutePath as a String and keep @Input.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#incorrect_use_of_input_annotation for more details about this problem.
* 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 1m 0s
Run Code Online (Sandbox Code Playgroud)
我不知道为什么会发生此错误,而之前一切正常。请有人帮我解决这个问题。
Ume*_*wat 12
我已经将 android studio 升级到 4.XX,当时 android studio 自动升级了我所有的 gradle 文件。
您需要检查两个文件
在gradle-wrapper.properties中需要使用
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
Run Code Online (Sandbox Code Playgroud)
并在项目 build.gradle 文件中
classpath 'com.android.tools.build:gradle:4.2.2
Run Code Online (Sandbox Code Playgroud)
Dmi*_*hin 10
在我的情况下,我在将 Gradle 升级到版本 7 后遇到了这样的错误。
我通过更新项目 build.gradle 文件中的版本“com.android.tools.build:gradle”来修复它:
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
}
}
Run Code Online (Sandbox Code Playgroud)
出现此错误是由于 Gradle 版本升级(Gradle 7+)造成的。您可以通过两种方式解决此问题。
compileSdkVersion
将app文件升级到31 build.gradle
,
android {
compileSdkVersion 31
...
}
Run Code Online (Sandbox Code Playgroud)
在项目文件中将gradle 构建工具版本更新为4.2+build.gradle
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
}
}
Run Code Online (Sandbox Code Playgroud)
或者
将文件中的gradle 发行版本更新为 6.5gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
Run Code Online (Sandbox Code Playgroud)
在项目文件中将gradle 构建工具版本更新为4.2+build.gradle
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
}
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3326 次 |
最近记录: |