我正在尝试安装react-native-camera
.
我做到了npm install react-native-camera
react-native link react-native-camera
。
它给了我错误的说法Gradle sync failed: Could not find method google() for arguments [] on repository container
。
我也尝试了手动链接,如文档中所述,直到我添加的第 6 步
allprojects {
repositories {
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
我使用exifinterface
了版本,例如 27.+ 而不是 25.+
我有distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl 和classpath 'com.android.tools.build:gradle:2.2.3'
我不知道我错过了什么。当我打开我的 android 工作室时,它给了我错误Gradle sync failed: Could not find method google() for arguments [] on repository container
当我react-native run-android
在手机上运行时,它会给我错误提示undefined is not an object (evaluating 'cameramanager.aspect')
谁能帮我我在这里想念什么?
这是我的毕业典礼
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// 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" }
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}