0

I'm working on an android application for which I got help for a lot of question from here. Thanks but now I'm stuck on "cannot resolve R" from a couple of days. I tried to work on 3 different applications and all I got is errors like that I don't know if this is a problem of android studio

android version

enter image description here

errors which I been receiving since ages I think

enter image description here

this ain't gradle.build[app] of above-mentioned project but is of another app as it's not building gradle when I restarted it now,

apply plugin: 'com.android.application'

android {
    compileSdkVersion 17
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.visionapps.demo.swipe"
        minSdkVersion 8
        targetSdkVersion 17
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:18.0.0'
    compile files('libs/otto-1.3.3.jar')
}
BenRoob
  • 1,662
  • 5
  • 22
  • 24

2 Answers2

0

In Android Studio, On the menu File -> Project Structure : change the default JDK location directory to your own:

/usr/local/java/jdk1.8.0_111 #path_to_your_jdk

enter image description here

Community
  • 1
  • 1
Audrius
  • 64
  • 1
  • 5
0

Change your compile sdk version to 24

    compileSdkVersion 24
    buildToolsVersion "24.0.3"
Jeeva
  • 1,791
  • 2
  • 23
  • 42