moaazsidat / react-native-qrcode-scanner

A QR code scanner component for React Native.
MIT License
2.04k stars 517 forks source link

black screeen in android #127

Open swaroopa94 opened 6 years ago

swaroopa94 commented 6 years ago

What's happening?

Hi, I installed this module and linked the modules as given in description but I am getting a black screen in android the camera is not opening up.

Build details?

android version 7.1.1 react-native-qrcode-scanner - ^1.0.1 react-native-camera - ^1.1.4

Here are my build.gradle

`buildscript { repositories { google() maven { url "https://maven.google.com" } jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects { repositories {

    maven { url "https://jitpack.io" }
     maven { url "https://maven.google.com" }
     google()
    mavenLocal()
    jcenter()
    maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url "$rootDir/../node_modules/react-native/android"
    }
}

}

/**

ext { compileSdkVersion = 26 targetSdkVersion = 26 buildToolsVersion = "26.0.2" googlePlayServicesVersion = "12.0.1" supportLibVersion = "26.1.0" }`

app/build.gradle

`dependencies { compile (project(':react-native-camera')) { exclude group: "com.google.android.gms"

compile ('com.google.android.gms:play-services-vision:12.0.1') {
    force = true
}

} compile project(':react-native-google-analytics-bridge') compile project(':react-native-vector-icons') compile project(':react-native-video') compile project(':react-native-push-notification') compile project(':react-native-orientation') compile project(':react-native-image-resizer') compile project(':react-native-android-permissions') compile project(':react-native-webrtc') compile(project(':react-native-maps')){ exclude group: 'com.google.android.gms', module: 'play-services-base' exclude group: 'com.google.android.gms', module: 'play-services-maps' }

compile project(':react-native-device-info')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+"  // From node_modules
compile project(':react-native-image-picker')
   compile 'com.google.android.gms:play-services-base:+'
compile 'com.google.android.gms:play-services-maps:+'
compile fileTree(dir: "node_modules/react-native-device-info/android/libs", include: ["*.jar"])

} `

in gradle.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

Please anyone suggest me how to solve this

GospelHW commented 5 years ago

same i

raazatul7 commented 4 years ago

Any update on this?

I am also facing a black screen when opening the scanner on some devices.