无法解决com.github [关闭]

问题描述 投票:-1回答:1

我试图在android studio 3.0.1中构建我的android项目,但在它完全加载之前它显示我错误无法解析com.github并且当我点击文件光标显示时我指向实现'com.github.clans:fab :1.6.2'build.gradle中的这个依赖项(模块:app)

这是我的build.gradle(模块应用程序)。

    apply plugin: 'com.android.application'
    apply plugin: 'com.google.firebase.firebase-perf'
    apply plugin: 'io.fabric'

    android {
        compileSdkVersion 28
        defaultConfig {
            applicationId "xxx.xx.xxxx"
            minSdkVersion 21
            targetSdkVersion 28
            versionCode 5
            versionName "2.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            multiDexEnabled true
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}
    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation 'com.android.support:appcompat-v7:28.0.0'
        implementation 'com.android.support.constraint:constraint-layout:1.1.2'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
        implementation 'com.github.clans:fab:1.6.2'
        implementation 'com.android.volley:volley:1.1.0'
        implementation('es.voghdev.pdfviewpager:library:1.0.4') {
            exclude group: 'com.android.support'
            exclude module: 'appcompat-v7'
            exclude module: 'support-v4'
        }
        implementation 'com.github.rieved :glide:4.8.0'
        annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
        //implementation 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
        implementation 'com.google.android.ads.consent:consent-library:1.0.6'
        implementation 'com.android.support:design:28.0.0'
        implementation 'de.hdodenhof:circleimageview:2.2.0'
        implementation 'com.google.android.gms:play-services-ads:16.0.0'
        implementation 'com.android.support:customtabs:28.0.0'
        implementation 'com.android.support:multidex:1.0.0'
        implementation 'com.android.support:recyclerview-v7:28.0.0'
        implementation 'org.jsoup:jsoup:1.8.3'
        implementation 'com.github.darsh2:MultipleImageSelect:v0.0.4'
        api 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
        implementation 'com.android.support:cardview-v7:28.0.0'
        implementation 'com.google.firebase:firebase-core:16.0.6'
        implementation 'com.google.firebase:firebase-messaging:17.3.4'
        implementation 'com.github.florent37:tutoshowcase:1.0.1'
        implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
        implementation 'com.linsea:universalvideoview:1.1.0@aar'    
        implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
        implementation 'com.google.firebase:firebase-perf:16.2.3'
    }

    apply plugin: 'com.google.gms.google-services'

我在网上冲浪,我尝试了不同的解决方案,如添加

allprojects {
    repositories {
        google()
        jcenter()
    }
}

这是我的build.gradle(gradle.properties)

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

buildscript {

    repositories {
        mavenCentral()
        google()
        jcenter()
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.2.0'
        classpath 'com.google.gms:google-services:4.2.0'
        classpath 'io.fabric.tools:gradle:1.26.1'
        classpath 'com.google.firebase:firebase-plugins:1.1.5'
    }
}

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

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

但这不起作用。

android android-gradle build.gradle
1个回答
0
投票

最后,我得到了这个问题。主要问题是您在此行上的依赖项实现中有一个空格

implementation 'com.github.rieved :glide:4.8.0'

从依赖项中删除此行,并添加此行以使用Glide

implementation 'com.github.bumptech.glide:glide:4.9.0'

希望这能解决你的问题。

© www.soinside.com 2019 - 2024. All rights reserved.