Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/216.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android tts应用程序关闭_Android_Text To Speech - Fatal编程技术网

Android tts应用程序关闭

Android tts应用程序关闭,android,text-to-speech,Android,Text To Speech,错误消息 构造函数TextToSpeech(SQLiteExample,SQLiteExample)未定义 04-16 04:06:19.860:E/AndroidRuntime(1728):由以下原因引起:java.lang.ClassCastException:com.sql.SQLiteExample 误差线 myTts = new TextToSpeech(this, this); 在onCreate方法中,由于出现错误,您没有在TextToSpeech中传递正确的参数。作为文档:

错误消息
构造函数TextToSpeech(SQLiteExample,SQLiteExample)未定义 04-16 04:06:19.860:E/AndroidRuntime(1728):由以下原因引起:java.lang.ClassCastException:com.sql.SQLiteExample 误差线

myTts = new TextToSpeech(this,  this);

在onCreate方法中,由于出现错误,您没有在
TextToSpeech
中传递正确的参数。作为文档:

上下文:此实例运行的上下文

listener:TextToSpeech引擎初始化后将调用的TextToSpeech.OnInitListener

TextToSpeech (Context context, TextToSpeech.OnInitListener listener)