You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a native UI component in Android. I believe I've followed the docs exactly, however the docs do not have an example of the ReactImageView which is the class that the view manager serves. I'm simply trying to display an Android TextView in RN. Once I get that to work I will move on to implementing my own class (so I don't strictly need TextView to work. The result of running this project is that literally nothing happens. It fails silently, and I don't see my "hello from android !" text appear on the screen and I don't know how to check if RN is even calling my Java code.
importReact,{Component}from'react'import{AppRegistry,Text,View}from'react-native';importScannerViewfrom'./ScannerView';classAwesomeProjectextendsComponent{render(){return(<View><Text> Hello world @@ </Text><ScannerViewtest="hello world"></ScannerView></View>);}}AppRegistry.registerComponent('AwesomeProject',()=>AwesomeProject)
I would love to use RN in my project, but there seems to be a lack of documentation online about how to create native modules in Android. I have posted this issue on Stack Overflow, but no one has responded.
The text was updated successfully, but these errors were encountered:
Carpetfizz
changed the title
Trying to create the most simple native Android component, getting errors
Trying to create the most simple native Android component, failing silently
Apr 18, 2017
Hello,
I'm trying to create a native UI component in Android. I believe I've followed the docs exactly, however the docs do not have an example of the
ReactImageView
which is the class that the view manager serves. I'm simply trying to display an AndroidTextView
in RN. Once I get that to work I will move on to implementing my own class (so I don't strictly needTextView
to work. The result of running this project is that literally nothing happens. It fails silently, and I don't see my"hello from android !"
text appear on the screen and I don't know how to check if RN is even calling my Java code.RCTScannerViewManager.java
RCTScannerViewPackage.java
MainApplication.java
ScannerView.js
index.android.js
I would love to use RN in my project, but there seems to be a lack of documentation online about how to create native modules in Android. I have posted this issue on Stack Overflow, but no one has responded.
The text was updated successfully, but these errors were encountered: