0

I tried almost every solution, but I think this is something specific to my project libraries.

This is my project level gradle.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    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 {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

And this is my app level gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.2'

    defaultConfig {
        applicationId "com.codepath.the_town_kitchen"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    signingConfigs {
        debug {
            storeFile file("keystore/debug.keystore")
        }
    }

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

repositories { mavenCentral() }

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')

    compile 'com.android.support:cardview-v7:27.0.2'
    compile 'com.android.support:appcompat-v7:27.0.2'
    compile 'com.android.support:recyclerview-v7:27.0.2'

    compile 'com.squareup.picasso:picasso:2.4.0'
    compile 'com.loopj.android:android-async-http:1.4.6'
    compile 'com.google.android.gms:play-services:6.5.87'
    compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
    compile 'com.facebook.android:facebook-android-sdk:3.21.1'
    compile 'com.github.flavienlaurent.datetimepicker:library:0.0.2'
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.github.johnkil.android-robototextview:robototextview:2.3.0'
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    compile 'com.makeramen:roundedimageview:1.5.0'
    compile 'com.stripe:stripe-android:2.0.2'
}

I have tried to sync all the libraries with latest version and also added multiDexEnabled option . However, still it is not working . What more can I modify to trace the issue?

I am using stripe as payment gateway. I tried to figure if its libraries could be issue, but there is not such thing I found which is relative.

Neeraj Verma
  • 2,174
  • 6
  • 30
  • 51

2 Answers2

0

I am not quite sure about the solution. However, I think the external libraries those you are using are having different support library versions in them. You need to define the exact version of support libraries that you are using in your application. So I think you need to modify the build.gradle like the following.

Remove repositories { mavenCentral() } as this is already defined in another place.

And add the following configuration in your app level build.gradle.

configurations.all {
    resolutionStrategy {
        force 'com.android.support:design:27.0.2'
        force 'com.android.support:support-v4:27.0.2'
        force 'com.android.support:appcompat-v7:27.0.2'
    }
}
Reaz Murshed
  • 23,691
  • 13
  • 78
  • 98
0

The stripe library is using support library version 27.1.0 (look at the stripe root build.gradle) and the support design library 27.1.0 is the requirement which can you see at https://github.com/stripe/stripe-android/blob/master/stripe/build.gradle#L19

So, you need either using support library 27.1.0 or exclude the support design library from the stripe.

Another probability, the compile 'com.google.android.gms:play-services:6.5.87' don't play well with the newest support library. So, try using the most recent google play service library.

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96