{"id":400,"date":"2015-03-25T20:55:09","date_gmt":"2015-03-25T20:55:09","guid":{"rendered":"http:\/\/installingcats.com\/?p=400"},"modified":"2015-03-25T20:55:09","modified_gmt":"2015-03-25T20:55:09","slug":"android-studio-failed-sync-gradle-project-fix","status":"publish","type":"post","link":"https:\/\/installingcats.com\/2015\/03\/25\/android-studio-failed-sync-gradle-project-fix\/","title":{"rendered":"Android Studio – Failed to Sync Gradle project – Fix"},"content":{"rendered":"
Matching SDK versions\u00a0identified in build.gradle (Module: app)<\/em> with the SDK versions you have installed via SDK Manager, then “Sync Now”, will fix\u00a0most Android Studio build errors.<\/strong><\/p>\n Common Android Studio build errors:<\/p>\n If you’re building \/ running someone else’s project that you’ve cloned from Github likely you’ll run into build errors in Android Studio.<\/p>\n Most Android Studio project build errors can be fixed in one file: \/project\/app\/build.gradle<\/p>\n There are multiple Gradle build files, frustratingly named build.gradle. \u00a0You want the build.gradle (Module: app)<\/strong> Gradle file.<\/p>\n <\/a><\/p>\n Here’s a typical Gradle build.gradle file<\/p>\n Starting from\u00a0the top of build.gradle file and moving down,<\/p>\n Matching SDK versions\u00a0identified in build.gradle (Module: app) with the SDK versions you have installed via SDK Manager, then “Sync Now”, will fix\u00a0most Android Studio build errors. Common Android Studio build errors: Failed to Sync Gradle project Failed to find target android-21 Install missing platform(s) and sync project If you’re building \/ running someone else’s project […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,2],"tags":[235,238],"_links":{"self":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/400"}],"collection":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/comments?post=400"}],"version-history":[{"count":0,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/400\/revisions"}],"wp:attachment":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/media?parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/categories?post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/tags?post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\n
android {\n compileSdkVersion 21\n buildToolsVersion \"21.1.2\"\n\n defaultConfig {\n applicationId \"com.domain.appname\"\n minSdkVersion 18\n targetSdkVersion 21\n versionCode 1\n versionName \"1.0\"\n }\n buildTypes {\n release {\n minifyEnabled false\n proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n }\n }\n}\n\ndependencies {\n compile fileTree(dir: 'libs', include: ['*.jar'])\n compile 'com.android.support:appcompat-v7:21.0.3'\n}\n\n<\/pre>\n
\n
\n
\n
\n
\n
compile 'com.android.support:appcompat-v7:21.0.3'<\/pre>\n<\/li>\n
\n