2016-04-28 121 views
0

我试图将org.mapsforge:mapsforge-map-android-extras:0.6.0依赖项添加到我的项目中。但是,当我这样做,我得到这个错误同步之后:错误:无法解决:android.support:compatibility-v4:23.1.1

Error:Failed to resolve: android.support:compatibility-v4:23.1.1

这是我.gradle文件从mapsforge-dev的谷歌组

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 23 
buildToolsVersion "23.0.3" 

defaultConfig { 
    applicationId "com.example.my.myapplication" 
    minSdkVersion 4 
    targetSdkVersion 23 
    versionCode 1 
    versionName "1.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:support-v4:23.1.1' 
compile 'org.mapsforge:mapsforge-map-android:0.6.0' 
compile 'com.caverock:androidsvg:1.2.2-beta-1' 
compile 'org.mapsforge:mapsforge-map-android-extras:0.6.0' 

//compile 'com.android.support:appcompat-v7:23.3.0' 
} 
+0

您是否确定已下载相应的支持库?如果您手动添加了编译'...'行,则应该通过模块设置进入依赖关系,以确认您拥有正确的支持库。 – CodyF

+0

我在模块的依赖性选项卡中看到“com.android.support:support-v4:23.1.1”行。我还在SDK Manager中的SDK Tools标签中重新安装了Android支持库 – BadEugene

回答

1

解决方案:

更换

compile 'org.mapsforge:mapsforge-map-android-extras:0.6.0' 

compile('org.mapsforge:mapsforge-map-android-extras:0.6.0') { 
    transitive = false 
} 

mapsforge文档将被更新。