2016-04-28 71 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文檔將被更新。