gpt4 book ai didi

android - AndroidManifest.xml :5:9-42 requires a placeholder substitution but no value for is provided. 中的属性 application@name - Flutter

转载 作者:行者123 更新时间:2023-12-04 23:41:17 28 4
gpt4 key购买 nike

在运行一个项目时,我遇到了以下错误。

Launching lib\main.dart on SM N970F in debug mode...
lib\main.dart:1
Parameter format not correct -
D:\CIIT GUIDE\Flutter\Apps\multi_delivery_app\android\app\src\main\AndroidManifest.xml:5:9-42 Error:
Attribute application@name at AndroidManifest.xml:5:9-42 requires a placeholder substitution but no value for <applicationName> is provided.
D:\CIIT GUIDE\Flutter\Apps\multi_delivery_app\android\app\src\debug\AndroidManifest.xml Error:
Validation failed, exiting

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed with multiple errors, see logs

* 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.gradle看起来像 android/app .

android {
compileSdkVersion 29
// buildToolsVersion '26.0.3'

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
applicationId "com.example.multi_delivery_app"
minSdkVersion 28
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
// Stackoverflow solution
manifestPlaceholders = [appAuthRedirectScheme: "com.example.multi_delivery_app"]
}

buildTypes {
release {
signingConfig signingConfigs.debug
}
}
我在网上找到了一些与 react-native 相关的解决方案,但没有任何效果。以下是我尝试过的解决方案的链接。
https://stackoverflow.com/a/52178888/7290043

最佳答案

您可以添加 appAuthRedirectScheme manifestPlaceholders 的属性而不是替换整个数组,使用 +=而不是 =例子 :

defaultConfig {
...
manifestPlaceholders += [appAuthRedirectScheme: "com.example.multi_delivery_app"]
}

关于android - AndroidManifest.xml :5:9-42 requires a placeholder substitution but no value for <applicationName> is provided. 中的属性 application@name - Flutter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70906879/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com