繁体   English   中英

错误:无法解决:recyclerview-v7

[英]Error:Failed to resolve: recyclerview-v7

当我在我的gradle中添加一些依赖项并同步它时设置错误:无法解决:recyclerview-v7。 我不知道我能做什么。我研究很多次,但没有解决。 我删除依赖但又错误。

低于我的依赖:

   apply plugin: 'com.android.application'
android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "avida.ican"
        minSdkVersion 16
        targetSdkVersion 26
        multiDexEnabled true
        versionCode 2
        versionName "0.0.2"

        /*vectorDrawables.useSupportLibrary = true*/
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')

        //noinspection GradleCompatible
        implementation 'com.android.support:appcompat-v7:26.1.0'
        implementation 'com.android.support:design:26.1.0'
        implementation 'com.android.support.constraint:constraint-layout:1.1.0'
        implementation 'com.android.support:support-vector-drawable:26.1.0'
        implementation 'com.android.support:support-v4:26.1.0'
        implementation files('libs/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')
        compile('com.stanfy:gson-xml-java:0.1.+') {
            exclude group: 'xmlpull', module: 'xmlpull' //xml to object
        }
        implementation 'com.android.support:cardview-v7:26.1.0'
        //________________________________________________
        //binding
        compile "com.jakewharton:butterknife:8.8.1"
        annotationProcessor "com.jakewharton:butterknife-compiler:8.8.1"
        //________________________________________________

        /*implementation 'com.afollestad.material-dialogs:core:0.9.6.0'*/

        implementation 'com.orhanobut:dialogplus:1.11@aar'

        //loading
        implementation 'com.wang.avi:library:2.1.3'

        //change font
        implementation 'uk.co.chrisjenx:calligraphy:2.3.0'

        // reactive network  checked
        implementation 'com.github.pwittchen:reactivenetwork-rx2:0.12.3'

        //contain FileUtils and another utils
        implementation 'commons-io:commons-io:2.5'

        //contain FileUtils and another utils
        implementation 'commons-codec:commons-codec:1.11'

        //otto bus
        implementation 'com.squareup:otto:1.3.8'

        implementation 'de.hdodenhof:circleimageview:2.2.0'

        //FloatingActionButton
        implementation 'com.github.clans:fab:1.6.4'

        //editore for text
        implementation 'jp.wasabeef:richeditor-android:1.2.2'

        //ormlite use in project sqlite database
        implementation 'com.j256.ormlite:ormlite-android:5.1'

        //file picker
        implementation 'com.github.angads25:filepicker:1.1.1'

        // recorder
        implementation 'com.github.adrielcafe:AndroidAudioRecorder:0.3.0'

        // image downloader
        implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

        //multy image,video Picker with list croper
        implementation 'com.crop.multiple:multipleImagePickerLib:1.4.4'

        implementation  'com.booking:rtlviewpager:1.0.1'

        //--------------------------Tab----Layout--------------------
        implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
           //Optional
        implementation 'com.ogaclejapan.smarttablayout:utils-v13:1.6.1@aar'
        //------------------------------------------------------------------

        //expandable TextView
        compile 'com.ms-square:expandableTextView:0.1.4'

    }
}

在我的项目下面:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
        maven {
            url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
        maven {
            url 'http://dl.bintray.com/amulyakhare/maven'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

我累了请帮助我。

现在我的gradle dosnt同步。

我想添加这个依赖: compile'c​​om.amulyakhare:com.amulyakhare.textdrawable:1.0.1'

哇喔喔我终于解决了我的问题。

我不知道。但问题来自maven google() 我删除了谷歌()并添加

 maven {
            url 'https://maven.google.com'
        }

代替。

我从这个链接解决了我的问题

这是我的项目gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        jcenter()
        maven {
            url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/'
        }

        maven {
            url 'http://dl.bintray.com/amulyakhare/maven'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        //google()
        maven {
            url 'https://maven.google.com'
        }
        jcenter()
        maven { url "https://jitpack.io" }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

你需要在你的项目级gradle文件中使用这个maven代码:

repositories{
maven {
    url 'http://dl.bintray.com/amulyakhare/maven'
}

}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM