react native 调用camera

使用第三方插件

npm install react-native-camera
react-native link react-native-camera
android需要特殊注意的两处:

AndroidManifest.xml

 
 

 
 

android/build.gradle

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

你可能感兴趣的:(react native 调用camera)