Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/207.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未能解析:com.github.florent37:MaterialViewPage:1.2.0-android_Android_Android Gradle Plugin - Fatal编程技术网

未能解析:com.github.florent37:MaterialViewPage:1.2.0-android

未能解析:com.github.florent37:MaterialViewPage:1.2.0-android,android,android-gradle-plugin,Android,Android Gradle Plugin,我想使用以下链接作为库: 我已在我的gradle中添加了该库,但收到以下错误消息: Failed to resolve: com.github.florent37:materialviewpager:1.2.0 我的gradle: repositories { maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven { url 'http://repo

我想使用以下链接作为库:

我已在我的
gradle
中添加了该库,但收到以下错误消息:

Failed to resolve: com.github.florent37:materialviewpager:1.2.0
我的
gradle

    repositories {
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url 'http://repo1.maven.org/maven2' }
        mavenCentral()
        jcenter()
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'

    compile ('com.github.florent37:materialviewpager:1.2.0@aar'){
        transitive = true
    }
已更新

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

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    } }

allprojects {
    repositories {
        mavenCentral()
    } }

task clean(type: Delete) {
    delete rootProject.buildDir }
试着替换

compile ('com.github.florent37:materialviewpager:1.2.0@aar'){
        transitive = true
    }  
用这个

compile 'com.github.florent37:materialviewpager:1.2.0'
试着替换

compile ('com.github.florent37:materialviewpager:1.2.0@aar'){
        transitive = true
    }  
用这个

compile 'com.github.florent37:materialviewpager:1.2.0'

删除应用程序/build.gradle中的此行

repositories {
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url 'http://repo1.maven.org/maven2' }
        mavenCentral()
        jcenter()
    }

删除应用程序/build.gradle中的此行

repositories {
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url 'http://repo1.maven.org/maven2' }
        mavenCentral()
        jcenter()
    }

你能展示一下你的顶级身材吗。这个gradle文件似乎没有任何问题。尝试添加这个类路径“classpath”com.jfrog.bintray.gradle:gradle bintray plugin:1.1“我把我的顶级build.gradleAh放在这里,我想你必须添加“jcenter()”,因为它是一个jcenter项目“allprojects{repositories{mavenCentral()jcenter()}”清理并再次同步也一样,但它不起作用,我收到了相同的错误消息尝试这可以显示你的顶级build.gradle。这个gradle文件似乎没有任何问题。尝试添加这个类路径“classpath”com.jfrog.bintray.gradle:gradle bintray plugin:1.1“我把我的顶级build.gradleAh放在这里,我想你必须添加“jcenter()”因为它是一个jcenter项目“allprojects{repositories{mavenCentral()jcenter()}}”,所以再次进行清理和同步,我也尝试了jcenter(),但它不起作用,我收到了相同的错误消息,请尝试一下