尝试从git://github.com/osmdroid/osmdroid构建OpenStreetMapView时,出现以下错误:
failed to find target with hash string android-23: D:\Users\myusername\AppData\Local\Android
我怎样才能解决这个问题?与此类似的先前问题建议检查是否未安装android 23,但就我而言是这样。
以下是一些相关信息:
ANDROID_HOME为 D:\Users\myusername\AppData\Local\Android\sdk
D:\Users\myusername\AppData\Local\Android\sdk\platforms\
包含目录\ android-23 \(以及android-19,android-21,android-22,android-MNC)
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "org.osmdroid.example"
minSdkVersion 8
targetSdkVersion 23
versionCode 16
versionName "4.4-SNAPSHOT"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
}
lintOptions {
abortOnError false
}
}
dependencies {
compile 'android.support:compatibility-v4:23+'
compile project(':osmdroid-android')
//compile 'org.osmdroid:osmdroid-third-party:4.4-SNAPSHOT'
}
我尝试将targetSdkVersion和compileSdkVersion更改为22。这导致错误消息更改为“ android-22”,而不是“ android-23”。