Al *_*ath 93 android gradle android-build
当尝试从git://github.com/osmdroid/osmdroid构建OpenStreetMapView时,我收到此错误:
failed to find target with hash string android-23: D:\Users\myusername\AppData\Local\Android
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?以前类似的问题建议检查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'
}
Run Code Online (Sandbox Code Playgroud)
我尝试将targetSdkVersion和compileSdkVersion更改为22.这会导致错误消息更改为"android-22"而不是"android-23".
hta*_*oya 77
在我的情况下,清除caché不起作用.
在SDK Manager上,请务必选中"显示包描述"框; 那么您还应该为您愿意安装的版本选择"Google API".
安装它然后你应该没问题
注意:我认为这可能是Android Studio中的错误.
现在将Compiled Sdk Version还原为Google API xx.
如果这不起作用,那么:
| 归档时间: |
|
| 查看次数: |
145382 次 |
| 最近记录: |