其他分享
首页 > 其他分享> > Android studio:错误:模块版本com.android.support:support-v13:13.0.0取决于库,但本身不是库

Android studio:错误:模块版本com.android.support:support-v13:13.0.0取决于库,但本身不是库

作者:互联网

我尝试将此库(https://github.com/daimajia/AndroidImageSlider)添加到我的项目中.我在gradle文件中添加了编译库,但出现错误:

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 20
    buildToolsVersion '20.0.0'

    defaultConfig {
        applicationId "com.pp.myapp"
        minSdkVersion 16
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.2'
    compile 'com.iangclifton.android:floatlabel:1.0'
    compile 'com.google.android.gms:play-services:5.0.89'
    compile "com.android.support:support-v4:+"
    compile 'com.squareup.picasso:picasso:2.3.2'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.slider:library:1.0.9@aar'
}

我得到这个错误:

Error:Module version com.android.support:support-v13:13.0.0 depends on libraries but is not a library itself

解决方法:

尝试添加此依赖项:

    compile 'com.android.support:support-v13:19.0.+'

您还必须从SDK安装Android支持库.

标签:android-gradle,android-studio,android-support-library,android
来源: https://codeday.me/bug/20191029/1958640.html