Failed to set up SDK: Error:Module 'app': platform 'Google Inc.:Google APIs:21' not found.
完全喪失了爲什麼這不起作用。試圖更新我的SDK到23,但意識到我沒有準備處理所有新的棄用等,所以我恢復到舊版本的Mercurial。我完全沒有別的了,而且迴歸應該已經解決了一切。不幸的是,我無法連接我的應用程序並構建它。我甚至從頭重新安裝了Android Studio,但我仍然收到相同的警告,我的應用程序根本無法生成。什麼可能會出錯?無法設置SDK:錯誤:模塊'app':平臺'Google Inc.:Google API:21'找不到
這裏是我的gradle構建:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.elgami.customizer"
minSdkVersion 14
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
//runProguard false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.ogaclejapan.smarttablayout:library:[email protected]'
compile 'com.github.antonyt:InfiniteViewPager:v1.0.0'
compile 'com.android.support:appcompat-v7:22.2.0'
// recyclerview
compile 'com.android.support:recyclerview-v7:23.1.1'
// google analytics
compile 'com.google.android.gms:play-services-analytics:8.3.0'
// pager sliding strip
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
// http library (for using beanstream REST)
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
// amaazon S3 uploads
compile 'com.amazonaws:aws-android-sdk-s3:2.1.+'
// paypal purchasing
compile files('libs/PayPalAndroidSDK-2.7.1.jar')
// Module dependency on ParseLoginUI library sources
compile project(':ParseLoginUI')
// Parse libs
compile files('libs/ParseCrashReporting-1.9.2.jar')
compile files('libs/Parse-1.9.1.jar')
compile files('libs/ParseFacebookUtilsV4-1.9.1.jar')
// android support v4
compile files('libs/android-support-v4.jar')
// facebook SDK
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
//butterknife
compile 'com.jakewharton:butterknife:6.1.0'
// Subsampling-scale-image-view (for templating)
//compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.1.4'
compile files('libs/AppRater.jar')
}
好吧,一些東西開始工作。現在我得到''錯誤:原因:未能找到目標21:D:\ Android \ sdk1 Install missing platform(s) and sync project'',但它不會讓我安裝它。有什麼辦法可以從某個地方手動下載嗎?我想在重新安裝Android Studio後,它下載了Sdk 23,但我現在確實需要保持在21。 ''忽略未知的包過濾器'android-21'Warning:包過濾器刪除所有包。沒有什麼可安裝的。請考慮嘗試在沒有包過濾器的情況下再次更新。'' – santafebound
您是否在項目中執行了「清理 - 重建 - 重啓 - 同步」? –
是的,我一直在收到同樣的問題。 – santafebound