首页 > 解决方案 > Android 无法解析 ExpandableLayout

问题描述

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).

我正在尝试导入从 github 下载的项目。在android studio中导入项目后,我收到此错误,我也无法运行项目。我尝试将版本更改为27.1.0,28.0.0,但问题没有解决

标签: android

解决方案


改变这个:

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

至:

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

当您使用时:

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

implementation 'com.android.support:support-v4:28.0.0'

推荐阅读