Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

332
Visualizações
react-native-camera was not found in the UIManager

So im using react-native-camera to scan barcodes in my app. But since i have upgraded my react native version it doesnt work anymore. It shows the error below :

Invariant Violation: requireNativeComponent: "RNCamera" was not found in the UIManager.

Here is the code and how i use it:

import { RNCamera } from 'react-native-camera';

const scanRef = createRef();

<RNCamera
              key={'scan_camera'}
              ref={scanRef}
              style={styles.RNCamera}
              type={RNCamera.Constants.Type.back}
              playSoundOnCapture={true}
              androidCameraPermissionOptions={{
                title: 'Permission to use camera',
                message: 'We need your permission to use your camera',
                buttonPositive: 'Ok',
                buttonNegative: 'Cancel',
              }}
              barCodeTypes={allowedBarcodeTypes}
              onGoogleVisionBarcodesDetected={({ barcodes }) => {
                if (barcodes.length) {
                  const barcode = barcodes[0];
                  const barcodeData = barcode.data;
                  // const barcodeType = barcode.type;
                  this.props.onBarCodeRead(barcodeData);
                  // close modal
                  closeModal();
                }
              }}
            >

              {
                ({ camera, status }) => {
                  if (status !== 'READY') return (<View style={styles.RNButtons}><Text>Loading...</Text></View>);
                  return (
                    <View style={styles.RNButtons}>
                      <TouchableOpacity style={[styles.RNButton, { backgroundColor: 'red' }]} onPress={() => closeModal()}>
                        <Text style={[styles.RNButtonText]}>{I18n.t('close').toUpperCase()}</Text>
                      </TouchableOpacity>
                    </View>
                  )
                }
              }
            </RNCamera>

I've tried almost everything, installed the package manually acording to the doucmentation but with no luck. My react version is "0.67.3"

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda