无法解析模块 'react-native-google-place-picker'

Failed to resolve module 'react-native-google-place-picker'

当我安装react-native-google-place-piker模块时,出现以下错误:

Android dependency 'com.google.android.gms:play-services-maps' has different version for the compile (8.4.0) and runtime (16.0.0) classpath. You should manually set the same version via DependencyResolution

见附图:

请帮我解决一下

我的回答不清楚,因为信息不多。

我使用 react-native-google-place-picker 和 react-native-maps 创建了一个 repo,但配置仅适用于 Android.

你可以去看看如何在不冲突的情况下实现这两个库。

git repo

编辑

您还必须更改 node_modules 中的库模块。

在 react-native-google-place-picker 上,我更改了 build.gradle 文件 (node_modules/react-native-google-place-picker/android/build.gradle)

在 react-native-maps 上相同的文件,但它在不同的目录中 (node_modules/react-native-maps/lib/android/build.gradle)

关于 README.md

的说明