我目前正在尝试使用React Native编写应用程序
在此应用程序中,我想使用Google Maps
和Firebase
,因此我添加了npm软件包react-native-maps
和react-native-firebase
。
我已使用提供的文档设置了程序包。
现在,当我要编译时,出现此错误:
Failed to capture snapshot of input files for task ':react-native-maps:compileDebugAidl' property 'importDirs' during up-to-date check.
> The library com.google.android.gms:play-services-base is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 11.8.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
问题是,如果我正确理解,则在版本10.8.0中react-native-maps
需要google-play-services
,而在版本15.0.1中react-native-firebase
需要google-play-services
我对build.gradle的依赖(我尝试了很多不同的版本):
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompatv7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
compile 'com.google.android.gms:play-services-base:15.0.1'
compile 'com.google.android.gms:play-services-base:10.8.0'
implementation project(':react-native-maps')
implementation project(':react-native-firebase')
implementation "com.google.firebase:firebase-core:16.0.3"
implementation "com.google.firebase:firebase-auth:16.0.3"
implementation "com.google.firebase:firebase-firestore:17.1.0"
}
在此先感谢您的帮助