ideacreation / react-native-barcodescanner

A barcode scanner component for react native - not maintained anymore - use react-native-camera
MIT License
537 stars 162 forks source link

RNBarcodeScannerView does not exist #38

Closed ackdav closed 8 years ago

ackdav commented 8 years ago

Native component for "RNBarcodeScannerView" does not exist

running on RN 0.29.. any ideas?

ThaJay commented 8 years ago

sudo rnpm link again probably. make sure you stop the packager first. for me rnpm always needs more than 1 attempt.

ackdav commented 8 years ago

@ThaJay thanks but no luck: rnpm-link info Android module react-native-barcodescanner is already linked

ThaJay commented 8 years ago

have you tried react-native run-android again? it often needs to reinstall when the java parts change

ackdav commented 8 years ago

deinstalled the app and went again with run-android... same error.

what RN version are you running?

ThaJay commented 8 years ago

this is my output from sudo rnpm link after doing it 2-3 times just to be sure.

rnpm-link info Android module react-native-barcodescanner is already linked 
rnpm-link info Android module react-native-vector-icons is already linked 
rnpm-link info Linking assets to android project 
rnpm-link info Assets has been successfully linked to your project

I just upgraded my react-native 0.28 to 0.29. Had to nuke my android folder, then run react-native android, but that has kind of become standard procedure here. don't forget to rnpm link again after. (and make sure you have the keyfile for compiling the prod version stored somewhere else)

so yeah that all works for me but now I have a white viewfinder, even when I set an absolute height / width. it all worked perfectly on 28.

just went back to react-native 0.28.0 and it works perfectly again. 0.29.0 breaks this.

ackdav commented 8 years ago

I typed "npm list" in my project to see the version and for some reason it installed an old version "0.x.x".. uninstalled it, restartet mac (because why the hell not), and installed it fresh to version 3.0.x

it works now.. made my day

fgrs commented 8 years ago

I have tried all of the above and I'm still getting the same error and instead of barcode scanner component I see vertical red line, just upgraded react-native to 0.30.0 but still no luck

jmdelatorre commented 7 years ago

Has someone else found a solution? I tried everything and still no luck

henninghall commented 7 years ago

@jmdelatorre The problem has to do with the linking. I did a manual linking which meant adding "new BarcodeScannerPackage()" to MainApplication.java and the problem was fixed.