android - 无法解析 com.github
问题描述
我正在尝试在 android studio 3.0.1 中构建我的 android 项目,但在它完全加载之前它向我显示错误无法解析 com.github并且当我单击在文件中显示时光标指向我的 实现 'com.github.clans:fab :1.6.2' build.gradle(Module: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
}
但这不起作用。
解决方案
最后,我得到了这个问题。主要问题是你在这一行的依赖实现中有一个空间
implementation 'com.github.rieved :glide:4.8.0'
从依赖项中删除此行并添加此行以使用 Glide
implementation 'com.github.bumptech.glide:glide:4.9.0'
希望这能解决您的问题。
推荐阅读
- sql - 选择与结果匹配的 WHERE 子句
- c++ - 如何在单链表的开头插入
- three.js - 如何在 THREE.js 中的场景之间共享顶点数据?
- node.js - 如何查找我的业务何时在 google 中为 google my business api 创建
- oauth-2.0 - 带有多个客户端应用程序的 Central Laravel Passport
- javascript - 无法读取 jQuery 中未定义的属性“切片”
- python - 匹配 2 个字符串,然后打印两个匹配项
- python - 使用 MMCIF2Dict 解析 CIF 文件的问题
- docker - Docker compose phpmyadmin 登录失败
- python - 从不同的列和索引中按条件获取值