android - REACT NATIVE:找不到参数的方法实现()
问题描述
我正在 React Native 中创建一个项目并尝试在 Android 中运行它,但是在 Android 中部署它时遇到了一些问题
在项目“:react-native-camera”上找不到参数 [com.facebook.react:react-native:0.20.1] 的方法 implementation()。
这是我在 logcat 中收到的错误消息
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
}
apply plugin: 'com.android.library'
def DEFAULT_COMPILE_SDK_VERSION = 26
def DEFAULT_BUILD_TOOLS_VERSION = "26.0.2"
def DEFAULT_TARGET_SDK_VERSION = 26
def DEFAULT_SUPPORT_LIBRARY_VERSION = "27.1.0"
android {
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ?
rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ?
rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
defaultConfig {
minSdkVersion 16
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
versionCode 1
versionName "1.0.0"
}
lintOptions {
abortOnError false
warning 'InvalidPackage'
}
buildToolsVersion '27.0.3'
}
repositories {
mavenCentral()
maven {
url 'https://maven.google.com'
}
maven { url "https://jitpack.io" }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is
installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
dependencies {
def supportLibVersion = rootProject.hasProperty('supportLibVersion') ? rootProject.supportLibVersion : DEFAULT_SUPPORT_LIBRARY_VERSION
implementation 'com.facebook.react:react-native:0.20.1'
implementation 'com.facebook.infer.annotation:infer-annotation:0.11.2'
implementation "com.google.zxing:core:3.2.1"
implementation "com.drewnoakes:metadata-extractor:2.9.1"
implementation "com.google.android.gms:play-services-vision:15.0.2"
implementation "com.android.support:exifinterface:27.1.1"
implementation "com.android.support:support-annotations:$supportLibVersion"
implementation "com.android.support:support-v4:27.1.1"
}
如果有人有解决方案,请告诉我。提前致谢
解决方案
推荐阅读
- javascript - 下载带有格式化日期的 CSV
- javascript - 从数组中的嵌套对象中删除对象属性
- python - CMAP 返回 'TypeError: int() 参数必须是字符串、类似字节的对象或数字,而不是 'list''
- jwt - 我有问题,我无法获取刷新令牌
- instrumentation - 调试未完成跟踪的最佳实践
- apache-spark - 在 Spark SQL 中使用 Presto JDBC 时无法识别的连接属性“url”
- rest - 我可以在我的 RESTful API 中使用重定向来为用户特定的内容设置别名吗
- python - Python OOP 问题:当 __init__() 函数中未将其作为参数提及时,类中的函数如何获取输入值?
- excel - Google 表格:仅导入某些选项卡可下载的 xlsx 链接?
- google-chrome - 使用 D3 缩放时特定于 Chrome 的问题