android gradle com.android.support libraries version issue

59
May 16, 2018, at 5:30 PM

When i build my gradle, i got a error. Hint shows:

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.0.2, 25.3.1 Examples include com.android.support:animated-vector-drawable:27.0.2 and com.android.support:design:25.3.1

This is my gradle:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':rest')
// Google
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:mediarouter-v7:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services:10.2.4'

// Analytics
// Fabric + Crashlytics
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
    transitive = true;
}
compile 'com.google.android.gms:play-services-analytics:10.2.4'
compile 'com.google.firebase:firebase-core:10.0.1'
// Facebook
compile 'com.facebook.android:facebook-android-sdk:4.+'
// Tools
// App Intro
compile 'com.github.paolorotolo:appintro:4.1.0'
// FloatingActionButton menu
compile 'com.github.clans:fab:1.6.1'
// Animation items for RecyclerView
compile 'jp.wasabeef:recyclerview-animators:2.0.1'
// Photo banner
compile 'com.bigkoo:convenientbanner:2.0.5'
// Time picker support for 4.0+
compile 'com.wdullaer:materialdatetimepicker:2.5.0'
// Displays the relative time with respect to the reference point
compile 'com.github.curioustechizen.android-ago:library:1.3.0'
compile 'com.paypal.sdk:paypal-android-sdk:2.15.0'
// Image loader (for high resolution pics)
compile 'com.github.bumptech.glide:glide:3.7.0'
// Icon font
compile "com.mikepenz:iconics-core:2.8.1@aar"
compile 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.2@aar'
compile 'com.wang.avi:library:2.1.3'
compile 'com.tomergoldst.android:tooltips:1.0.6'
}

I also follow this answer Change

compile 'com.android.support:design:25.3.1'

to

compile 'com.android.support:design:27.0.2'

However, after i sync my project. The hint shows:

This support library should not use a different version(27) than the compileSdkVersion(25)
Answer 1

Make sure to use the latest version for your support libs (27.1.1). Also change from compile to implementation, compile has been deprecated. Finally, change your compileSdkVersion to 27 in your app level build.gradle file.

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compile project(':rest')
// Google
implementation 'com.android.support:multidex:1.0.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:mediarouter-v7:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.android.gms:play-services:10.2.4'

// Analytics
// Fabric + Crashlytics
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
    transitive = true;
}
implementation 'com.google.android.gms:play-services-analytics:10.2.4'
implementation 'com.google.firebase:firebase-core:10.0.1'
// Facebook
implementation 'com.facebook.android:facebook-android-sdk:4.+'
// Tools
// App Intro
implementation 'com.github.paolorotolo:appintro:4.1.0'
// FloatingActionButton menu
implementation 'com.github.clans:fab:1.6.1'
// Animation items for RecyclerView
implementation 'jp.wasabeef:recyclerview-animators:2.0.1'
// Photo banner
implementation 'com.bigkoo:convenientbanner:2.0.5'
// Time picker support for 4.0+
implementation 'com.wdullaer:materialdatetimepicker:2.5.0'
// Displays the relative time with respect to the reference point
implementation 'com.github.curioustechizen.android-ago:library:1.3.0'
implementation 'com.paypal.sdk:paypal-android-sdk:2.15.0'
// Image loader (for high resolution pics)
implementation 'com.github.bumptech.glide:glide:3.7.0'
// Icon font
implementation "com.mikepenz:iconics-core:2.8.1@aar"
implementation 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.2@aar'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.tomergoldst.android:tooltips:1.0.6'
}
READ ALSO
onAdImpression() not getting Called in Admob Listener

onAdImpression() not getting Called in Admob Listener

In Banner ad onAdImpression() not getting called any more

51
add/remove css class to div via shiny

add/remove css class to div via shiny

I have a select menu in shiny like below

34
Angular Bootstrap css : Force Last Column In a Row To Fill Remaining Empty Space

Angular Bootstrap css : Force Last Column In a Row To Fill Remaining Empty Space

In my Angular5 app, I have a container component that I'm using to declare a row containing some components organized in n columns like the following:

41