Mapbox:在Gradle中添加LocationLayer插件 [英] Mapbox: Cant add LocationLayer plugin in gradle
本文介绍了Mapbox:在Gradle中添加LocationLayer插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试在我的gradle文件中包含LocationLayer插件时,出现错误。
交通插件和建筑插件工作正常。
when I try to include the LocationLayer plugin in my gradle file I get an error. The traffic plugin and building plugin work fine.
错误:
The error:
Failed to resolve: android.arch.lifecycle:extension:1.0.0-alpha3
Failed to resolve: android.arch.lifecycle:runtime:1.0.0-alpha3
build.gradle:
build.gradle:
repositories {
mavenCentral()
}
dependencies {
//Mapbox
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.0@aar') {
transitive = true
}
//Navigation
compile 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.3.1'
//Location layer
compile 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.1.0'
//Google Play Location Service
compile 'com.google.android.gms:play-services-location:11.0.2'
//Geolocation
compile 'com.mapbox.mapboxsdk:mapbox-android-ui:2.1.3'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espressocore:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
推荐答案
Per 这些说明,您可以尝试将 maven {url'https://maven.google.com'}
添加到 repositories
并刷新Gradle?它应该基本如下所示:
Per these instructions, could you try adding maven { url 'https://maven.google.com' }
to your repositories
and refresh Gradle? It should basically look like this:
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
}
}
这篇关于Mapbox:在Gradle中添加LocationLayer插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文