-2
apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.shrikanthravi.chatviewlibrary"
        minSdkVersion 21
        targetSdkVersion
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.0.1'
    implementation 'com.android.support:animated-vector-drawable:27.0.1'

    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'

    implementation 'com.android.support:cardview-v7:27.0.1'
    implementation 'com.android.support:recyclerview-v7:27.0.1'
    implementation 'com.github.zagum:Android-ExpandIcon:1.2.1'
    implementation 'com.balysv:material-ripple:1.0.2'
    implementation 'com.github.SilenceDut:ExpandableLayout:1.2.0'
    implementation 'jp.wasabeef:recyclerview-animators:2.3.0'
    implementation 'com.zhihu.android:matisse:0.4.3'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.chrisbanes:PhotoView:2.1.3'
    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.github.lopei:collageview:0.1.3'
    implementation 'com.wang.avi:library:2.1.3'
    implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.14'

    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation project(':chatview')
    implementation 'com.android.support:support-annotations:27.0.1'
}



   //Here is the suggestion when i try to change the version
    All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.0, 27.0.0, 25.3.1. Examples include com.android.support:cardview-v7:27.1.0 and com.android.support:animated-vector-drawable:27.0.0 less... (Ctrl+F1) 

    Inspection info:There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion).

I am trying to import the project which i downloaded from github. After importing the project in android studio i am getting this error also i can't able to run the project.I tried to change the version's to 27.1.0,28.0.0 but the problem is not solved

deepa
  • 77
  • 13
  • try to `clean & build` project first – M D Mar 22 '19 at 06:17
  • I tried already but it is not working – deepa Mar 22 '19 at 06:18
  • OK try to add `vectorDrawables.useSupportLibrary = true` inside `defaultConfig` in module level `build.gradle` and used latest support lib `implementation 'com.android.support:appcompat-v7:$28.0.0'` – M D Mar 22 '19 at 06:19
  • [Already posted. Search old answers before asking](https://stackoverflow.com/questions/53094716/implementation-com-android-supportappcompat-v728-0-0/53094950#53094950) – Er. Pratik Chatterjee Mar 22 '19 at 06:21
  • @Er.PratikChatterjee I tried your suggestion but still its not working – deepa Mar 22 '19 at 06:27

5 Answers5

1

Change this:

implementation 'com.github.SilenceDut:ExpandableLayout:1.2.0'

to:

implementation 'com.github.SilenceDut:ExpandableLayout:1.1.0' 

when you are using:

implementation 'com.android.support:appcompat-v7:28.0.0'

implementation 'com.android.support:support-v4:28.0.0'
double-beep
  • 5,031
  • 17
  • 33
  • 41
PrakashExplorer
  • 161
  • 1
  • 9
0

Change this into your project :

implementation 'com.android.support:appcompat-v7:27.0.1' // use this

because this version is not exist in android try above one version:

implementation 'com.android.support:appcompat-v7:27.1.0' // do not use this

Screenshot:

http://prntscr.com/n1armz

EDIT :

This library is deprecated now that's why you have this issue in your gradle :

implementation 'com.github.SilenceDut:ExpandableLayout:1.2.0'
Abhinav Gupta
  • 2,225
  • 1
  • 14
  • 30
0
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

Add this to gradle file to avoid google version mismatch warnings,At the end of your build.gradle file

AbhayBohra
  • 2,047
  • 24
  • 36
0

add implementation 'com.android.support:animated-vector-drawable:27.1.0' in your gradle

as an old version of com.android.support:support-v4:26.1.0 is there imported by some other library which is causing the issue with com.android.support:appcompat-v7:28.0.0, similarly add the other implementations that occur after this one. so final would be like

implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:animated-vector-drawable:27.1.0'

... and so on for the l;ibraries having mismatched versions

implementation 'com.android.support:appcompat-v7:28.0.0'

and check for already answered posts before asking new question.

  • implementation 'com.android.support:cardview-v7:27.1.0' implementation 'com.android.support:animated-vector-drawable:27.0.0' implementation 'com.android.support:appcompat-v7:27.0.1' implementation 'com.android.support:animated-vector-drawable:27.0.1' use same 27.0.1 for all the above...version needs to emain same for whichever u user 270.1 or 27.1.0 so make them consistant – Er. Pratik Chatterjee Mar 22 '19 at 06:43
0

For those who are still frustrated

"Engineering is the art of compromise" by Petroski

Since the library is deprecated and you are having Gradle resolution issues.

  1. Go to the Repo here
  2. Make u download the directory library
  3. Go to your Android Project
  4. Edit your settings.gradle
  5. Add the following line

    include ':app', ':library'

  6. then create a folder called "library" in where the "app" folder is
  7. copy the content of library folder of the Repo(it contains src, build.gradle etc) to your newly created folder
  8. Go to your module level build.gradle then add this line

    implementation project(':library')

  9. If issues arise like use "implementation" instead of "compile" or compileSDK is not the same the your project's specs..

  10. Go to library/build.gradle just change the "compile" gradle keyword to "implementation" and compileSDK should be the sdk you are using....

Phew !! Oboy We Die here!!

Declan Nnadozie
  • 1,805
  • 1
  • 10
  • 20