3

I'm trying to use material design. But 'com.android.support:design-v7:25.0.0' is giving the following error.

apply plugin: 'com.android.application'

    android {
    compileSdkVersion 25
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.example.usaukglu.scrollabletab"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }}

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.android.support:design-v7:25.0.0'

}

Error:Failed to find: com.android.support:design-v7:25.0.0 Open File. Open in Project Structure dialog

IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
Fatema
  • 41
  • 1
  • 2
  • 9

5 Answers5

3

Replace that line with this and it would definitely work.

'com.android.support:design:25.0.0'
Pang
  • 9,564
  • 146
  • 81
  • 122
Rohit Kumar
  • 185
  • 1
  • 1
  • 11
  • oh no worries. Even i had that issue. Plz upvote and accept the answer as it helped you as a token of gratitude :) – Rohit Kumar Nov 05 '16 at 05:26
2

Step 1: Open the build.gradle file for your application.

Step 2: Make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint. For example:

allprojects {
repositories {
    jcenter()
    maven {
        url "https://maven.google.com"
    }
  }
}
Omer
  • 534
  • 7
  • 19
0

there is some bug in the v7:25.0.0,(its for nougat) the preview of your layout will not be shown properly, so try to use v7:24.2.1, but you need to install build tool

compileSdkVersion 24
buildToolsVersion "24.0.2"

compile 'com.android.support:appcompat-v7:24.2.1'
Sam
  • 45
  • 1
  • 8
0

Copy paste this code:

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"

defaultConfig {
    applicationId "com.example.usaukglu.scrollabletab"
    minSdkVersion 15
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design-v7:25.0.0'

}

you had to change buildToolsVersion "21.1.2" to buildToolsVersion "25.0.0"

Kunal Parikh
  • 463
  • 4
  • 15
-1

apply plugin: 'com.android.application'

android { compileSdkVersion 25 buildToolsVersion "25.0.2"

defaultConfig {
    applicationId "liefsolutions.com.thebestservice"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'buildToolsVersion 24.9.5' compile 'com.android.support:appcompat-v7:25.1.0' compile 'com.android.support:design:25.1.0'

}