Q:

AndroidStudio cannot resolve R and layout files

When I upgraded AndroidStudio from 0.8 (or 0.9) to 1.0.2 AndroidStudio was not able to resolve my R file and suggests importing it (import my.package.R). I'm using SDK Tools 24.0.2 and SDK Platform-tools 21.
I've tried cleaning, resynching and rebuilding the project, as well as checking the layout files for errors, but I didn't find anything.
Another weird thing is that when typing "R.layout" AndroidStudio suggests either "android.R" or "my.package.app.R". When chosing the former I'm not able to use my layout files, when chosing the later it automatically imports "my.package.app.R"
When importing R a co-worker of mine is even able to run the app...
This is my build.gradle file:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 16
    buildToolsVersion "20.0.0"
    defaultConfig {
        applicationId "my.package.app"
        minSdkVersion 14
        targetSdkVersion 20
        versionCode 6
        versionName '0.1.6'
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

I think it could be of use to some of you here.
Thanks!
Edit: I was told that it is perfectly normal to import one's own R class. Sorry for the inconvenience...

A:

If is showing error (red signed) and is not compiling I'm pretty sure there is something wrong in at least one XML file (like a tag unclosed).

