maven - React Native Maps 依赖问题
问题描述
我目前正在尝试将谷歌地图集成到我的 react native 应用程序(android 端)中,并遵循官方文档中提供的所有安装步骤,但存在一些依赖性问题。
在尝试了数以千计的可用解决方案之后,终于将其发布在这里。
ERROR: Unable to resolve dependency for ':react-native-
maps@debug/compileClasspath': Could not resolve
com.android.support:support-annotations:25.2.0.
Show Details
Affected Modules: react-native-maps
ERROR: Unable to resolve dependency for ':react-native-
maps@debug/compileClasspath': Could not resolve
com.android.support:support-core-utils:25.2.0.
Show Details
Affected Modules: react-native-maps
我从
maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" }
至
`maven {
url 'https://maven.google.com/'
name 'Google'
}`
它修复了 react-native-maps 的依赖问题,但遇到了另一个问题
'error: cannot find symbol
@ReactMethod(isBlockingSynchronousMethod = true)'
我同时添加了两个 Maven 资源,以便可以像这样相应地获取依赖项
`allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
但再次遇到地图依赖问题。请注意,当我将 maven.google.com 添加为获取依赖项的唯一资源时,依赖项问题得到修复。
解决方案
推荐阅读
- python - 基于正则表达式创建两个数据框
- java - 如何在任务中关闭带有名称的库存
- javascript - 使用 JavaScript 循环中的两个数组
- c# - ShareFile 用户使用 API 邀请到 Podio 工作区
- ubuntu - 如何使用通过 sssh 连接的 ubuntu 在浏览器上打开链接
- sbt - AKKA 集群:在 2 个远程节点之间发送和接收参与者消息
- xamarin.forms - 在选择器 xamarin 表单上获取 selectedindexchanged 上的选定项目源绑定值
- ios - Firebase:iOS应用程序被杀死并重新启动后如何保留用户提要
- netflix-zuul - micronaut 可以与 zuul 或 spring 云网关之类的网关一起使用吗?
- java - 为什么我的同步方法不能正常工作?