TencentCloud / TPNS-Flutter-Plugin

MIT License
61 stars 35 forks source link

使用最新版tpns flutter 插件配置完之APP是中文名称时显示乱码 #38

Closed WFCN closed 2 years ago

WFCN commented 2 years ago

配置如下

AndroidManifest

    <application

    android:label="${labelName}"

    android:name="${applicationName}"

    android:icon="@mipmap/ic_launcher">

gradle配置

    defaultConfig {
    applicationId "xxxxxx"
    minSdkVersion 21
    targetSdkVersion 33
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    ndk {
        /// 选择要添加的对应.so 库。
        abiFilters 'armeabi-v7a', 'arm64-v8a'
    }
    manifestPlaceholders += [
            XG_ACCESS_ID : "xxxx",
            XG_ACCESS_KEY: "xx",
            VIVO_APPID: "xx",
            VIVO_APPKEY:"xxxx",
            labelName:"中AAA文"
    ]
}

显示结果为:

image

这是flutter的bug还是咱们的这边插件的问题

WFCN commented 2 years ago

已解决
`

  <application
    android:label="@string/app_name"
    android:name="${applicationName}"
    android:icon="@mipmap/ic_launcher">

`

values 下新建strings.xml

`

    <?xml version="1.0" encoding="utf-8"?>
    <resources xmlns:tools="http://schemas.android.com/tools">
   <string name="app_name">中文名称</string>
     </resources>

`