Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Resource Missing Error - Android Studio

When I use Android Studio and I try to create a new project it gets stuck on Gradle: Resolve dependencies ':app:_debugCompile' . So I ran gradle from the terminal and I get this error: Resource missing. [HTTP GET: https://jcenter.bintray.com/com/android/support/support-annotations/21.0.2/support-annotations-21.0.2.pom]

How can I fix this?

Hi Charlie

Can you check your build.gradle(app)

It should look something like (below). Under dependancies does it show (compile 'com.android.support:appcompat-v7:21.0.2') if not you will need to update your SDK Manager with the version update 21. If you already have 21 installed you may need to reinstall it via SDK Manager as there may be a compiler error with version 21 support.

apply plugin: 'com.android.application'

android { compileSdkVersion 21 buildToolsVersion "21.1.1"

defaultConfig {
    applicationId "uk.co.waynetech.hangman"
    minSdkVersion 10
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.2' }

Thanks! I just restarted Android Studio this morning and it worked but thanks for the answer.