我用“印地语”语言实现了文本到语音转换,它是一种印度语言,我的应用程序在 API 级别 29 之前工作正常。它对于英语工作正常,但对于印地语则不然。但在 API 级别 30 的新设备中,它不起作用。在 API 级别 30 设备中调试其给出的结果值 -2“语言不支持错误”。
private void setTextTospeech() {
textToSpeech = new TextToSpeech(mContext, new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
if (status == TextToSpeech.SUCCESS) {
if (language.toLowerCase().contains(langaugeCodeEnglish)) {
int result = textToSpeech.setLanguage(new Locale("en", "IN"));
if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) {
//Toast.makeText(mContext, result + " is not supported", Toast.LENGTH_SHORT).show();
Log.e("Text2SpeechWidget", result + " is not supported");
}
} else {
int result = textToSpeech.setLanguage(new Locale("hi", "IN"));
if …Run Code Online (Sandbox Code Playgroud) android text-to-speech android-manifest android-studio android-api-levels
我尝试将 AAB 文件上传到播放控制台,但为上传的 APK 或 Android 应用程序包提供了一个带有意图过滤器的活动、活动别名、服务或广播接收器,但没有设置“ ”android:exported属性。此文件无法安装在 Android 12 或更高版本上。请参阅:developer.android.com/about/versions/12/behavior-changes-12#exported 错误。我exported= true也将属性设置为活动。并且还要添加android:exported="true" tools:node="merge".
我根据建议对清单进行了更改,然后也遇到了同样的问题。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.example">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:label="Demo"
android:icon="@mipmap/ic_launcher_foreground">
<activity
android:name=".MainActivity"
android:launchMode="singleTop" …Run Code Online (Sandbox Code Playgroud) android android-studio flutter google-play-console flutter-release
我想在使用 flutter 开发的 Android 和 IOS 应用程序中添加 Facebook 应用程序事件。
Android:它询问将用于与 Android 应用程序进行深层链接的活动的名称。我会在flutter的各个屏幕上将应用程序事件通知给Facebook。现在我关心的是应该在此处添加哪个活动或类文件名以防出现抖动?根据清单文件,MainActivity 是 Android 中首先调用的 Activity,但如果该文件没有任何更改,我可以直接使用它在 Facebook 上进行深度链接吗?
android deep-linking facebook-android-sdk flutter flutter-facebook-login