我正在尝试将 react-native-maps 添加到我的 react-native-firebase 入门应用程序中。在我尝试添加 react-native-maps 之前,我没有收到错误。以下是我完全按照他们的指示后的代码。我尝试将地图依赖项更改为 15.0.1 并删除重复的播放服务,但这并没有解决任何问题。非常感谢任何帮助或见解!一个多星期以来,我一直在为此烦恼并寻找答案。
dependencies {
implementation project(':react-native-vector-icons')
// react-native-google-signin
implementation(project(':react-native-google-signin')) {
exclude group: "com.google.android.gms"
}
implementation 'com.google.android.gms:play-services-auth:15.0.0'
// react-native-fbsdk
implementation project(':react-native-fbsdk')
implementation(project(':react-native-firebase')) {
transitive = false
}
// RNFirebase required dependencies
implementation "com.google.firebase:firebase-core:15.0.2"
implementation "com.google.android.gms:play-services-base:15.0.0"
// RNFirebase optional dependencies
implementation "com.google.firebase:firebase-auth:15.1.0"
implementation "com.google.firebase:firebase-database:15.0.0"
implementation "com.google.firebase:firebase-firestore:16.0.0"
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:27.0.2"
implementation "com.facebook.react:react-native:+" // From node_modules
// react-native-maps required dependencies
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
implementation 'com.google.android.gms:play-services-base:10.0.1'
implementation 'com.google.android.gms:play-services-maps:10.0.1'
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'