LEO DELOS SANTOS
LEO DELOS SANTOS

Reputation: 13

Android studio, AppCompatActivity import android.support.v7. library not recognize

Libraries from android.support is not recognized

import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

compiler

    compile 'com.android.support:appcompat-v7:23.+'
    compile 'com.android.support:design:23.+'

config

 applicationId "com.example.leoandroid.leoandroid"
    minSdkVersion 18
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

tried everything. updating and moreover. its getting on my nerves.

Upvotes: 1

Views: 1928

Answers (2)

IntelliJ Amiya
IntelliJ Amiya

Reputation: 75788

For API 23:

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'

Or

compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'

Finally

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2" // or 23.0.1

    defaultConfig {
        applicationId "//"
        minSdkVersion 18
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}



dependencies {
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:recyclerview-v7:23.1.1'



}

Then Clean-Rebuild-Restart Your Project

Upvotes: 1

MrGyovka
MrGyovka

Reputation: 313

Try to update Android Studio! For a same error with higher version, it worked for me.

Upvotes: 0

Related Questions