Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android error undefined is not an object(evaluating 'RECTToast.show') #17

Open
jony-w opened this issue Nov 24, 2016 · 2 comments
Open

Comments

@jony-w
Copy link

jony-w commented Nov 24, 2016

package.json

"dependencies": {
"@remobile/react-native-toast": "^1.0.5",
}

use

import Toast from '@remobile/react-native-toast';
render() {
return (
<TouchableOpacity onPress={Toast.showShortTop.bind(null, "this is a message")}>
Hello fffworld!

)
}

error:
undefined is not an object(evaluating 'RECTToast.show')
cannot read property 'show' of undefined
May I ask what is the reason?

@maotora
Copy link

maotora commented Dec 17, 2016

@jonyshi I have the same issue too.. :(

@otech47
Copy link

otech47 commented Jan 3, 2017

Make sure to follow the README for the Android setup. I got this error then added

import com.remobile.toast.RCTToastPackage;

and

new RCTToastPackage()

to MainApplication.java and it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants