https://github.com/wonday/react-native-pdf ,下载这个项目的example项目跑,一直报
android:
Fail to resolve support-media-cpmpat
Fail to resolve support-utils 等等,
后来看了网上说,把google配置放在最前面就可以了。亲测,果然有用。
allprojects {
repositories {
maven {
url'https://maven.google.com/'
name'Google'
}
google()
mavenLocal()
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://dl.google.com/dl/android/maven2/'
// name 'Google'
// }
}
}
网友评论