我正在尝试将react-native-firebase添加到一个新创建的expo项目中,我成功弹出了该应用程序,但是当我尝试添加该库时,该项目无法构建,并且出现以下错误
Rails.application.salesforce_client.query("select Id, Something__c from Account where Id = 'someid'")
我更新了所有的firbase依赖关系,但仍然失败,然后使用此行强制停止错误,以便至少可以构建
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.2.0.
先前的错误已消失,但我保留了其他错误。例如:
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
平台:Ubuntu 19:04 博览会:最新 react-native-firebase:5.2.5
渐变(项目)文件
Error: Program type already present: com.google.android.gms.internal.measurement.zzbk
渐变(应用)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/android/android-tools/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
// classpath 'com.google.gms:google-services:3.2.1'
classpath 'de.undercouch:gradle-download-task:2.0.0'
classpath 'com.amazonaws:aws-devicefarm-gradle-plugin:1.3' // https://github.com/awslabs/aws-device-farm-gradle-plugin/releases
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
// For non-detach
maven {
url "$rootDir/maven"
}
// For old expoviews to work
maven {
url "$rootDir/versioned-abis/expoview-abi26_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi27_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi28_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi29_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi30_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi31_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi32_0_0/maven"
}
// For detach
maven {
url "$rootDir/../node_modules/expokit/maven"
}
maven {
// We use a modified build of com.android.support.test:runner:1.0.1. Explanation in maven-test/README
url "$rootDir/maven-test"
}
maven {
// Local Maven repo containing AARs with JSC built for Android
url "$rootDir/../node_modules/jsc-android/dist"
}
flatDir {
dirs 'libs'
// dirs project(':expoview').file('libs')
}
// https://github.com/google/ExoPlayer/issues/5225#issuecomment-445739013
maven { url 'https://google.bintray.com/exoplayer' }
maven { url "https://jitpack.io" }
// Want this last so that we never end up with a stale cache
mavenLocal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
答案 0 :(得分:1)
添加
maven { // expo-camera bundles a custom
com.google.android:cameraview url
"$rootDir/../node_modules/expo-camera/android/maven" }
在
处进行build.gradle allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
maven { // expo-camera bundles a custom com.google.android:cameraview url
"$rootDir/../node_modules/expo-camera/android/maven" }
google()
jcenter()
maven { url 'https://jitpack.io' }
} }