0

This is my gradle file, I am using same play-service version for all libraries, but its giving warning message on it, and it also crash 1 of the activity on run-time only in lollipop devices, with java.lang.NoClassDefFoundError error message.

This may be due to the Gradle warning message.

Kindly guide me how to resolve this error message.

     compileSdkVersion 24
        buildToolsVersion "24.0.3"
        defaultConfig {

            applicationId 'com.myapp.app'
            minSdkVersion 21
            targetSdkVersion 23
            versionCode 103
            versionName "1.2.1"
            multiDexEnabled true
            ndk {
                abiFilters "armeabi", "armeabi-v7a", "x86"
            }
        } 

dependencies {
compile 'com.android.support:multidex:1.0.1'
compile 'com.mobsandgeeks:android-saripaar:2.0.2'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'com.google.code.gson:gson:2.4'
compile 'com.google.android.gms:play-services-analytics-impl:9.0.1'
compile 'com.google.android.gms:play-services-maps:9.0.1'
compile 'com.google.android.gms:play-services-analytics:9.0.1'
compile 'com.google.android.gms:play-services-location:9.0.1'
compile 'com.google.android.gms:play-services-tagmanager-api:9.0.1'
compile 'com.google.android.gms:play-services-tagmanager:9.0.1'

}

enter image description here

dev90
  • 7,187
  • 15
  • 80
  • 153
  • 1
    you can check if third party libs also use the same versions. – Raghunandan Jan 31 '17 at 05:59
  • @Raghunandan How to check that? There are few `aar `files as well in the project . – dev90 Jan 31 '17 at 06:00
  • on mac `./gradlew app:dependencies` run this command from terminal on windows its `gradlew.bat app:dependencies`. You should get a dependency tree to figure out if third party libs also use the same version. You can have all libs use the same version by defining them in your root build.gradle file and referring them in all your libs – Raghunandan Jan 31 '17 at 06:02
  • @Raghunandan different versions of multiple dependencies are using in my project, I can't find all of them in my gradle file, How to find and remove them? or force gradle to use the latest or defined version – dev90 Jan 31 '17 at 06:26
  • check this http://stackoverflow.com/questions/28444016/how-can-i-force-gradle-to-set-the-same-version-for-two-dependencies – Raghunandan Jan 31 '17 at 06:30

0 Answers0