Я пытаюсь установить 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'
Я не знаю, что мне не хватает. Когда я открываю свою андроид студию, она выдает ошибку 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')
Может кто-нибудь помочь мне, что я здесь скучаю ??
Вот мой Gradle
// 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"
}
}
}