Closed sumanbogati closed 8 years ago
@sumanbogati It seems you have copied the entire MainActicty from the documentation. You just need to add .addPackage(new RCTTextToSpeechModule())
in your Activity.
Also make sure you have added gradle dependency
@mihirsoni how do I get this RCTTextToSpeechModule
module in my main activity Mainactivity.java file as I have done import com.facebook.react.RCTTextToSpeechModule;
in file does not work, my activity Mainactivity.java file has something like
`
package com.mysound;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "mysound";
}
}`
How do I add this .addPackage(new RCTTextToSpeechModule())
in my activity file.
It will be great if there is any working example you can provide to me.
My react native version
react-native-cli: 0.2. react-native: 0.29.1
@sumanbogati , Try to follow the steps mentioned in READ.ME in your project. You don't need to copy paste exactly what is there inside the documentation. Just follow and change accoridng to your project.
First you need to install the dependency from the gradle setup
Closing this, please let me know if face problem again.
As you suggested I have done following in MainActivity.java
After run the react-native run-android command, I got following error
How to fix this problem?