首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何利用毕加索库与雄激素

如何利用毕加索库与雄激素
EN

Stack Overflow用户
提问于 2020-04-24 22:34:58
回答 1查看 1.7K关注 0票数 1

我有一个一年前的代码,我花了很大的精力,这段代码在某些地方使用picasso库下载图像并使用它们。今天,我尝试改进我的代码,迁移到androidx,并将 gradle 升级到最新版本,但是它似乎不再是同步gradle文件了,当我注释picasso< code >E 211库时,同步再次发生E 112平滑E 213

Google建议迁移到androidx,以便能够为最新的android版本、最新的play服务和jetpack库提供服务。有什么问题吗?以及如何解决这个问题?

这是我的Gradle应用程序级别文件:

代码语言:javascript
复制
apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"

    defaultConfig {
        applicationId "com.ramikabbani.sheikhsouk"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    // Picasso
    implementation 'com.squareup.picasso:picasso:2.71828'

    // Glide
    implementation 'com.github.bumptech.glide:glide:4.9.0'

    implementation 'com.google.android.material:material:1.1.0'
//

}

这是我的顶级项目分级文件:

代码语言:javascript
复制
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

这是旧的项目应用程序级梯度文件: apply plugin:'com.android.application‘

代码语言:javascript
复制
    android {
        compileSdkVersion 29
        defaultConfig {
            applicationId "com.dalilukom.dalilukom"
            minSdkVersion 19
            targetSdkVersion 29
            versionCode 21
            versionName "1.21"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:26.1.0'
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
        implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
        implementation 'com.squareup.picasso:picasso:2.71828'
        implementation 'com.github.bumptech.glide:glide:3.8.0'
        //implementation 'com.android.volley:volley:1.1.1'
        implementation 'com.android.support:design:26.1.0'
        implementation 'com.android.support:support-v4:26.1.0'
    //    implementation 'com.amitshekhar.android:android-networking:1.0.2'
    //    implementation 'com.android.support:design:26.1.0'
    //    implementation 'com.android.support:appcompat-v7:27.1.1'
    //    implementation 'com.android.support:design:27.1.1'
    //implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

这也是旧项目的顶级gradle文件:

代码语言:javascript
复制
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

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


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}
EN

回答 1

Stack Overflow用户

发布于 2020-04-24 22:43:52

只需迁移到androidx,并在您的年级文件中获取用于androidx的Picasso依赖项。你应该没事的

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61418425

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档