[英]Error:Failed to find target with hash string 'android-24' in:
你好嗎? 我缺乏經驗,非常喜歡android,但在創建項目時遇到了困難。 我以前編譯的工具是android studio 2.2 Preview5。 創建項目后,找到錯誤。
Error:Failed to find target with hash string 'android-24' in: E:\android-sdk-windows
<a href="install.android.platform">Install missing platform(s) and sync project</a>
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "www.jike.com.myapplication"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.+'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha4'
testCompile 'junit:junit:4.12'
}
因為它是自學習的,所以沒有人可以咨詢。在stackoverflow中,我發現了類似的問題,但我不太了解。
我是新手不懂,希望各位朋友詳細解釋,非常感謝。
我的英文不好,上面的文字都是用軟件翻譯的,這個詞不夠准確,請原諒我。
我希望得到幫助。 再次感謝。
錯誤:無法使用哈希字符串'android-24'查找目標
打開SDK Manager並檢查更新
您可以使用
compileSdkVersion 23
buildToolsVersion "24.0.0"
並設置
targetSdkVersion 23
編譯'com.android.support:appcompat-v7:23.4.0'
最后, Clean-Rebuild
和Run 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.