我正在尝试在android studio 3.0.1中构建我的android项目,但是在它完全加载之前,它向我显示错误无法解析com.github ,当我单击“在文件中显示光标”时,指向我在build.gradle(Module:app)
中实现'com.github.clans:fab:1.6.2'这是我的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
}
但这不起作用。
答案 0 :(得分:0)
最后,我明白了。主要问题是此行上的依赖项实现中有一个空格
func testLoginScreen() {
let homeInteractor: HomeInteractor = HomeInteractor ()
homeInteractor.initSDK()
sleep(4)
homeInteractor.loginUser(userNameText: "a@a.com", passwordText: "Password1")
XCTAssertEqual(isInitlized, true)
}
从依赖项中删除此行,并添加它以使用Glide
implementation 'com.github.rieved :glide:4.8.0'
希望这可以解决您的问题。