Setting up Gradle for api 26 (Android) Setting up Gradle for api 26 (Android) android android

Setting up Gradle for api 26 (Android)


Have you added the google maven endpoint?

Important: The support libraries are now available through Google's Maven repository. You do not need to download the support repository from the SDK Manager. For more information, see Support Library Setup.

Add the endpoint to your build.gradle file:

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

Which can be replaced by the shortcut google() since Android Gradle v3:

allprojects {    repositories {        jcenter()        google()    }}

If you already have any maven url inside repositories, you can add the reference after them, i.e.:

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


allprojects {    repositories {        jcenter()        maven {            url "https://maven.google.com"        }    }}android {    compileSdkVersion 26    buildToolsVersion "26.0.1"    defaultConfig {        applicationId "com.keshav.retroft2arrayinsidearrayexamplekeshav"        minSdkVersion 15        targetSdkVersion 26        versionCode 1        versionName "1.0"        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }} compile 'com.android.support:appcompat-v7:26.0.1'    compile 'com.android.support:recyclerview-v7:26.0.1'    compile 'com.android.support:cardview-v7:26.0.1'


Appart from setting maven source url to your gradle, I would suggest to add both design and appcompat libraries.Currently the latest version is 26.1.0

maven {    url "https://maven.google.com"}

...

compile 'com.android.support:appcompat-v7:26.1.0'compile 'com.android.support:design:26.1.0'