reb*_*ion 5 android push-notification flutter huawei-mobile-services huawei-push-notification
添加“com.huawei.agconnect”插件后,我的 flutter 项目无法构建:
失败:构建失败并出现异常。
出了什么问题:任务“:app:processDebugResources”执行失败。执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生失败
Android 资源链接失败 C:\Users\denbo.gradle\caches\transforms-2\files-2.1\2f7fef5146433a886db0a4b7a0dabd3c\push-5.1.1.301\AndroidManifest.xml:9:5-11:55: AAPT: 错误: 资源 attr/ ??? (又名 com.example.app:attr/???)未找到。
我的 android/build.gradle
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
maven { url 'https://developer.huawei.com/repo/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
classpath 'com.huawei.agconnect:agcp:1.4.2.301'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://developer.huawei.com/repo/' }
}
}
Run Code Online (Sandbox Code Playgroud)
android/app/build.gradle
//stuff
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.huawei.agconnect'
Run Code Online (Sandbox Code Playgroud)
问题是我在 AndroidManifest 中使用西里尔字符作为我的应用程序的标签。
\n<application\n android:name="io.flutter.app.FlutterApplication"\n android:label="\xd0\x90\xd0\x91\xd0\x92\xd0\x93"\n android:icon="@mipmap/launcher_icon">\nRun Code Online (Sandbox Code Playgroud)\n将其更改为之后
\n<application\n android:name="io.flutter.app.FlutterApplication"\n android:label="ABCD"\n android:icon="@mipmap/launcher_icon">\nRun Code Online (Sandbox Code Playgroud)\n我能够构建我的应用程序。
\n| 归档时间: |
|
| 查看次数: |
293 次 |
| 最近记录: |