【发布时间】:2019-08-11 04:18:04
【问题描述】:
我尝试使用 react native app 并在 gradle 文件中有以下 sn-p
dependencies {
implementation project(':react-native-maps')
implementation project(':react-native-geolocation-service')
implementation project(':react-native-background-timer')
implementation project(':react-native-mauron85-background-geolocation')
implementation project(':react-native-contacts')
implementation project(':react-native-gesture-handler')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
}
我用谷歌搜索,发现下面的行解决了问题
compile(project(':react-native-maps')) {
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
compile 'com.google.android.gms:play-services-base:11.+'
compile 'com.google.android.gms:play-services-maps:11.+'
compile 'com.google.android.gms:play-services-location:+'
但我的 gradle 文件中没有 compile(project....
我正在使用
"react": "16.6.3",
"react-native": "0.58.6",
"react-native-geolocation-service": "^2.0.0",
"react-native-gesture-handler": "^1.1.0",
"react-native-maps": "^0.23.0",
如何解决此问题
【问题讨论】:
-
implementation替换compile。所以你可以切换它。所以在你看到compile的地方,请改用implementation。 -
我没听懂
-
好的好的,让我检查一下
标签: google-maps react-native react-native-android react-native-maps