Glide несовместим с androidx для импорта androidx.annotation - PullRequest
0 голосов
/ 26 сентября 2019

Я скачал исходный код галереи и делаю миграцию на androidx.Но у скольжения есть некоторые ошибки.Например в glideOptions.java import android.support.annotation есть ошибка.Я пытаюсь изменить этот файл.Поэтому я добавляю import androidx. annotaion, но android studio показала мне:

сгенерированные исходные файлы не должны редактироваться.

Как я могу решить эту проблему?мой Build.gradle:

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
    }

}

apply plugin: 'com.android.application'

repositories {
    google()
    jcenter()
    maven  { url "http://repo1.maven.org/maven2" }
    maven {  url  "http://dl.bintray.com/dasar/maven" }
    maven { url 'https://maven.google.com' }
}

android {
    compileSdkVersion 29
    buildToolsVersion '28.0.3'
    defaultConfig {

        minSdkVersion 15
        targetSdkVersion 29
        versionCode 1
        versionName "1.0.0"
        vectorDrawables.useSupportLibrary = true
    }

    lintOptions {
        disable 'MissingTranslation'
        disable 'ExtraTranslation'
    }
    // This is handled for you by the 2.0+ Gradle Plugin
    aaptOptions {
        additionalParameters "--no-version-vectors"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.palette:palette:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.browser:browser:1.0.0'
    implementation "androidx.exifinterface:exifinterface:1.0.0"

    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.android.support:support-annotations:28.0.0'

    implementation 'com.koushikdutta.ion:ion:2.1.7'
    implementation 'com.mikepenz:iconics-core:3.0.3@aar'
    implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'
    implementation 'com.mikepenz:community-material-typeface:2.0.46.1@aar'
    implementation 'com.mikepenz:fontawesome-typeface:4.7.0.2@aar'
    implementation "com.mikepenz:iconics-views:3.0.3@aar"
    implementation 'com.github.paolorotolo:appintro:3.4.0'
    implementation 'com.yalantis:ucrop:1.5.0'
    implementation 'uz.shift:colorpicker:0.5@aar'
    implementation 'com.balysv:material-ripple:1.0.2'
    implementation 'com.commit451:PhotoView:1.2.5'
    implementation 'com.google.android.exoplayer:exoplayer:r1.5.7'
    implementation 'de.psdev.licensesdialog:licensesdialog:1.8.3'
    implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.drewnoakes:metadata-extractor:2.11.0'
    implementation 'org.jetbrains:annotations-java5:15.0'
    implementation 'co.ronash.android:pushe-base:1.3.3'
    api 'com.google.android.gms:play-services-gcm:17.0.0'
} 

, а gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
...