not working on android - undefined is not an object
See original GitHub issueI followed the example in the readme (tried both manual installation and automatic) and no matter what I do, when I press the share button Share.open always fails with:
undefined is not an object (evaluating '_reactNativeShare2.default.open')
building on Ubuntu 14.04 64-bit and running on Android 5.0.1
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
undefined is not an object (evaluating 'data.map')
Best guess from the code snippet is that you are rendering before data is populated. I would try something like this;
Read more >undefined is not an object (evaluating 'l.default.manifest ...
React native maps not working on Android standalone app. App is crashing and not rendering any maps on screen. Environment. System: OS: WINDOWS ......
Read more >undefined is not an object (evaluating 'process.version.split ...
Description. After installing packages and running metro bundler, I get a 100% successful build but this error in the android emulator. · React...
Read more >Problem with IOS in Mac. TypeError undefined is not an object ...
Problem with IOS in Mac. TypeError undefined is not an object (evaluating'self.view.tpLoginSignUp.tfIdentify.text'). How can i fix this?
Read more >undefined - JavaScript - MDN Web Docs - Mozilla
A function returns undefined if a value was not returned . Note: While you can use undefined as an identifier (variable name) in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, rnpm link doesn’t work. In React Native >= 0.29 you need:
Android
npm install react-native-share --save
Open up
android/app/src/main/java/[...]/MainApplication.java
import cl.json.RNSharePackage;
to the imports at the top of the filenew RNSharePackage()
to the list returned by thegetPackages()
methodAppend the following lines to
android/settings.gradle
:include ':react-native-share' project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')
Insert the following lines inside the dependencies block in
android/app/build.gradle
:@EstebanFuentealba it works with these instructions, thanks 👍