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)