运行项目后,我收到以下错误。
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 …Run Code Online (Sandbox Code Playgroud) 我正在尝试从build.gradle android扩展程序在AndroidManifest.xml文件中执行替换,但是收到此错误:
AndroidManifest.xml:89:16 Error:
Attribute uses-library#com.company.platform.${encoding}@name at AndroidManifest.xml:89:16 requires a placeholder substitution but no value for <encoding> is provided.
/Users/Company/Desktop/Checkout/android/Project/app/src/main/AndroidManifest.xml:0:0 Error:
Validation failed, exiting
:app:processDebugManifest FAILED
Run Code Online (Sandbox Code Playgroud)
这是清单文件的片段:
...
</receiver>
<uses-library android:name="com.company.platform.${encoding}" />
</application>
...
Run Code Online (Sandbox Code Playgroud)
这是一个剪辑build.gradle:
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.company.app"
minSdkVersion 23
targetSdkVersion 23
versionName cityVersion
setProperty("archivesBaseName", "City_$versionName")
manifestPlaceholders = [encoding: "some value"]
manifestPlaceholders = [version: cityVersion]
}
Run Code Online (Sandbox Code Playgroud)
我也尝试在buildTypes中添加manifestPlaceholders,即
buildTypes {
release {
minifyEnabled true
shrinkResources true
manifestPlaceholders = [encoding: deviceEncoding]
manifestPlaceholders = [version: cityIDVersion] …Run Code Online (Sandbox Code Playgroud)