0

I updated sdk to 27.1.0 but now i want to downgrade to 27.0.2 My build.gradle contains these lines:

apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'project-report'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "cz.my.package"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 73
        versionName "1.1.5"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

greendao {
    schemaVersion 6
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    implementation 'com.android.support:appcompat-v7:27.0.2'
    implementation 'com.android.support:support-v4:27.0.2'
    implementation 'com.android.support:design:27.0.2'
    implementation 'com.android.support:recyclerview-v7:27.0.2'
    implementation 'com.google.android.gms:play-services-maps:11.8.0'
    implementation 'com.google.firebase:firebase-messaging:11.8.0'
    implementation 'com.github.bumptech.glide:glide:4.0.0'
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    implementation 'org.apmem.tools:layouts:1.10@aar'
    implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
    implementation 'com.thoughtbot:expandablerecyclerview:1.3'
    implementation 'in.championswimmer:SimpleFingerGestures_Android_Library:1.2'
    implementation 'org.greenrobot:greendao:3.2.2'
    implementation 'com.kyleduo.switchbutton:library:2.0.0'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
    implementation 'cz.martinforejt:swipetohidelayout:1.0.4'
    implementation 'org.apache.commons:commons-lang3:3.4'
    testImplementation 'junit:junit:4.12'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    implementation files('libs/YouTubeAndroidPlayerApi.jar')
    implementation 'org.jetbrains:annotations-java5:15.0'
}

apply plugin: 'com.google.gms.google-services'

But android studio says, that it founds some lib with version 27.1.0 and all must have same version. Another problem is that i cant find 27 folder inside sdk/extras/android/m2repository/com/android/support/

How can i downgrade support libraries?

Fori
  • 475
  • 5
  • 15
  • 1
    "I updated sdk to 27.1.0 but now i want to downgrade to 27.0.2" -- why? "But android studio says, that it founds some lib with version 27.1.0 and all must have same version" -- if cleaning your project does not help, then something else in your `dependencies` is looking for 27.1.0. "Another problem is that i cant find 27 folder inside sdk/extras/android/m2repository/com/android/support/" -- the Android Support library comes from the `google()` repository. – CommonsWare Mar 16 '18 at 19:36
  • Downgrade because of this bug: https://stackoverflow.com/questions/49228979/ So where is support library stored, i checked: sdk/extras/google – Fori Mar 16 '18 at 19:41
  • The repository is at https://maven.google.com. – CommonsWare Mar 16 '18 at 19:43
  • I mean where is stored on my disk, for older versions i have folders like this: sdk\extras\android\m2repository\com\android\support\appcompat-v7 – Fori Mar 16 '18 at 19:46
  • It isn't stored in the SDK. The official location is https://maven.google.com. This is not significantly different than getting dependencies from JCenter or Maven Central. In all those cases, Gradle will cache copies of the artifacts as needed. – CommonsWare Mar 16 '18 at 19:48
  • Can edit your answer and paste full build.gradle code – KMI Mar 16 '18 at 19:50
  • @KMI sure added – Fori Mar 16 '18 at 19:54
  • Delete this line buildToolsVersion '27.0.3'. And project->clean project – KMI Mar 16 '18 at 20:00
  • @KMI does not helped :( – Fori Mar 16 '18 at 20:04
  • Can you build project without error? – KMI Mar 16 '18 at 20:06
  • No, i get `com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives` – Fori Mar 16 '18 at 20:07
  • So i found problem in this dependency: `com.theartofdev.edmodo:android-image-cropper:2.6.0` is there any way to use it with 27.0.2 version? – Fori Mar 16 '18 at 20:22
  • 1
    Check this https://stackoverflow.com/questions/46267621/unable-to-merge-dex – KMI Mar 16 '18 at 20:25
  • Thanks i found this solution: `implementation ('com.theartofdev.edmodo:android-image-cropper:2.6.0') { exclude group: 'com.android.support' }` – Fori Mar 16 '18 at 20:31
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/166995/discussion-between-kmi-and-fori). – KMI Mar 16 '18 at 20:35

0 Answers0