未能使用哈希字符串android-23查找目标 [英] failed to find target with hash string android-23
问题描述
在尝试从git://github.com/osmdroid/osmdroid构建OpenStreetMapView时,出现此错误:无法使用哈希字符串android-23查找目标:D:\ Users \myusername\AppData\Local\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)
uild.gradle
apply plugin:'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion 23.0.1
defaultConfig {
applicationIdorg.osmdroid.example
minSdkVersion 8
targetSdkVersion 23
versionCode 16
versionName 4.4-SNAPSHOT
}
buildTypes {
release {
minifyEnabl ed $ false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
packagingOptions {
exclude'META-INF / LICENSE'
排除'META-INF / DEPENDENCIES'
排除'META-INF / NOTICE'
}
lintOptions {
abortOnError false
依赖关系{
编译'android.support:compatibility-v4:23+'
编译项目(':osmdroid- android')
// compile'org.osmdroid:osmdroid-third-party:4.4-SNAPSHOT'
}
我尝试将targetSdkVersion和compileSdkVersion更改为22.这会导致错误消息更改为android-22,而不是android-23。
SDK管理器:
在我的情况下,清除caché不起作用。
在SDK Manager上,请务必选中show package descriptions中的复选框;那么您还应该为您愿意安装的版本选择Google API。
安装它然后您应该可以使用
When trying to build OpenStreetMapView from git://github.com/osmdroid/osmdroid, I get this error:
failed to find target with hash string android-23: D:\Users\myusername\AppData\Local\Android
How can I fix this? Previous questions similar to this suggest checking that android 23 is not installed, but in my case, it is.
Below is some pertinent info:
ANDROID_HOME is D:\Users\myusername\AppData\Local\Android\sdk
D:\Users\myusername\AppData\Local\Android\sdk\platforms\
contains the directory \android-23\, (as well as 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'
}
I tried changing targetSdkVersion and compileSdkVersion to 22. This causes the error message to change to "android-22" instead of "android-23".
SDK Manager:
In my case, clearing caché didn't work.
On SDK Manager, be sure to check the box on "show package descriptions"; then you should also select the "Google APIs" for the version you are willing to install.
Install it and then you should be ok
这篇关于未能使用哈希字符串android-23查找目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!