Install gradle on Android O (API 26)

Android Studio automatically updates the following components for API 26:

  • ROM - SDK for API 26
  • Android SDK Build-Tools 26
  • Android Emulator 26.0.3
  • Android SDK Platforms-Tools 26.0.0
  • Android SDK Tools 26.0.2

My gradle 2.3.3:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.0'
    defaultConfig {
        applicationId "com.mycompany.myapplication"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 4
        versionName "0.0.4"
        testInstrumentationRunner "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'
    })
    /////////If I change it to 26.0.0 it gives errors.///////////
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:support-vector-drawable:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
    /////////////////////////////////////////////////////////////
    testCompile 'junit:junit:4.12'
}

I have two questions (see commented line in Gradle):

How to find out the latest version of these libraries (I just throw random numbers and try them until I find the latest version).

The excluded group has "com.android.support" if I delete, what do I need to specify these libraries? Therefore, I see a lot of people, including the com.android.support libraries, so there is a reason why I think so.

I searched on developer.android.com and the latest version is 24.2.0 (so the really old one I use 25.3.1).

+4
3

26, + .

compile 'com.android.support:appcompat-v7:26+'

, , 26.?.? . Android Studio, , .

, : https://developer.android.com/topic/libraries/support-library/revisions.html

, "com.android.support", . , , , . recycler, :

compile 'com.android.support:recyclerview-v7:26.0.0-beta2'
+1

:

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

Source: https://habr.com/ru/post/1680102/


All Articles