vpn 确保能够下载到react-native-camera
修改build.gradle为
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
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/'
name 'Google'
}
}
}
同步 rebuild
检查gradle和MainApplication中是否已经引入reac-native-camera的相关pakage