sumup / sumup-android-sdk

Sample App for the SumUp Android SDK
Other
101 stars 29 forks source link

Unable to resolve dependency #87

Open daanyaal opened 5 years ago

daanyaal commented 5 years ago

I'm having an issue trying to migrate to SumUp 3.2.0 and my project now fails to build. I've also tried to run the sample project and still same issue. Please help.

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.sumup:merchant-sdk:3.2.0. ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.sumup:merchant-sdk:3.2.0. ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.sumup:merchant-sdk:3.2.0.

Android Studio 3.4.1

JullianSU commented 5 years ago

Hi Daanyall,

We have tried to reproduce and we could not arrive at the same conclusion, would you be able to try again let us know if the problem still occurs?

Many thanks,

ismael974 commented 5 years ago

Hello, I have the same issue when I try update to version 3.2.0. Android Studio 3.4.2

Log error- sync failed

CONFIGURE SUCCESSFUL in 0s ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.sumup:merchant-sdk:3.2.0. Show Details Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.sumup:merchant-sdk:3.2.0. Show Details Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.sumup:merchant-sdk:3.2.0. Show Details Affected Modules: app

My graddle config :

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"
    defaultConfig {
        applicationId "fr.app.myApp"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    //implementation 'com.sumup:merchant-sdk:3.1.2'
    implementation 'com.sumup:merchant-sdk:3.2.0'

    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
    implementation 'org.honorato.multistatetogglebutton:multistatetogglebutton:0.2.2'
    // implementation 'com.google.code.gson:gson:2.5.0'
    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'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.auth0.android:jwtdecode:1.3.0'

}
JullianSU commented 4 years ago

Hi Daanyal, Hi Ismael 974,

Could you please try to compile within build.gradle(project) in the following order:

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

We have prepared the branch with the change in "try/reorder-maven-repo" Please, check out to the branch and let us know if it works.

Many thanks,

Roqk commented 4 years ago

Hi, i have the same issue and same error when build my project and changing the position of Jcenter() didn't helped me.

I clone this sampleApp and i noticed that uses:

and works. But if i upgrade gradle ( plugin to 3.5.2 and Gradle version to 5.4.1 ) get the error:

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.sumup:merchant-sdk:3.2.1.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.sumup:merchant-sdk:3.2.1.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.sumup:merchant-sdk:3.2.1.
Show Details
Affected Modules: app

might there be a connection between the two?

ismael974 commented 4 years ago

to resolve the problem :

Roqk commented 4 years ago

Thank you Ismael974 for the answer but what i mean to say is that if i use android gradle plugin (v3.3.2) and gradle (v4.10.1) the sync of project works with no error. Instead if i upgrade android gradle plugin and consequently version of gradle, i'm not able to sync the project, but get usual errors:

"Unable to resolve dependency for ':app@debug/compileClasspath'" etc..

So i was wondering if there is a connection between this two things.

I haven't a global knowdledge of Gradle and plugin android so i don't know if the solution of this issue should be searched here but my intention was to bring this fact up to the devs of sumup