D
D
Denis Loboda2018-04-04 08:56:05
Android
Denis Loboda, 2018-04-04 08:56:05

How to include Picasso library in android project?

Errors occur when linking the library:
5ac46858f1751621269270.jpeg5ac46861f3448988055596.jpeg
Code:
build.gragle(project)

buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
 
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
 
allprojects {
    repositories {
        maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
        google()
        jcenter()
    }
}
 
task clean(type: Delete) {
    delete rootProject.buildDir
}

build.gradle(module)
apply plugin: 'com.android.application'
 
android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.darkos.photoapp"
        minSdkVersion 17
        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'
        }
        debug {
            ext.enableCrashlytics = false
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}
 
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
 
    implementation 'com.squareup.picasso:picasso:2.71828'
 
    compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
    compile 'io.reactivex.rxjava2:rxjava:2.1.3'
    compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'
    compile 'com.google.code.gson:gson:2.8.2'
    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'com.android.support:recyclerview-v7:26.1.0'
    compile 'com.hannesdorfmann.mosby3:mvp:3.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:0.5'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Petya Persianov, 2018-04-04
@Dr0nk

dependencies {
compile 'com.squareup.picasso:picasso:2.5.0'
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question