0

Despite Gradle is telling me build succesfull (and I can run the app), android studio cannot resolve "import android.support.v4" and for the support.v7 lib can only resolve appcompat... I tried the button "Use Sync project with gradle files", upgraded my build tools to the latest version but I still have this error.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion '22.0.1'

    defaultConfig {
        applicationId "me.myapp"
        minSdkVersion 14
        targetSdkVersion 22
        versionCode 1
        versionName "1.0.0"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

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

dependencies {
    compile 'org.jsoup:jsoup:1.8.2'
    compile 'com.android.support:recyclerview-v7:22.1.1'
    compile 'com.android.support:support-v4:22.1.1'
    compile 'com.android.support:appcompat-v7:22.1.1'
}

Please help me fix this!

Stack Diego
  • 1,309
  • 17
  • 43

1 Answers1

0

Follow the below steps.

  • Run all updates: Update android studio and SDK to the latest version.
  • go to File->invalidate caches/Restart.

Hope this fixes the problem.

Sanu Soman
  • 59
  • 1
  • 8