2

I updated android studio to 3.1.3 . After updating all external libraries i implemented, showing "Cannot resolve this method". But it's working fine, i can run the app. It even showing setOnClickListener in red color.

Build.gradle(App)

 apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
    applicationId "satlaa.mysql_test"
    minSdkVersion 16
    targetSdkVersion 16
    versionCode 1
    versionName "1.0"
    testInstrumentationRunne
   "android.support.test.runner.AndroidJUnitRunner"
  }
 buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
 'proguard-rules.pro'
    }
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-vector-drawable:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.bogdwellers:pinchtozoom:0.1'
implementation 'android.arch.paging:runtime:1.0.0'
implementation 'org.parceler:parceler-api:1.1.6'
implementation 'it.sephiroth.android.library.imagezoom:imagezoom:2.3.0'
}

Build.gradle(Project)

// Top-level build file where you can add configuration options common to all 
sub-projects/modules.

buildscript {
repositories {
    mavenCentral()
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.3'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
   }
  }

 allprojects {
 repositories {
    jcenter()
    maven { url 'https://maven.google.com' }
 }
}

task clean(type: Delete) {
delete rootProject.buildDir
}

I tried to delete gradle cache. I even did invalidate cache and restart.enter image description here

mukeshsoni
  • 483
  • 8
  • 29

1 Answers1

4

Sometimes this happens because of libraries cache what you can try is:

  1. Do invalidate cache and restart which is in the file menu

Or you can manually do this which is really effective:

  1. Go to \YourProject\.idea\libraries and delete all libraries containing support in their names and also delete volley library if you've added it

Now recompile the code

Tabish
  • 390
  • 3
  • 12