gpt4 book ai didi

java - 无法解析 : com. android.support.test.espresso :espresso-intents:27. 0.2

转载 作者:行者123 更新时间:2023-12-01 19:59:44 28 4
gpt4 key购买 nike

嗨,开发人员,当我尝试执行应用程序时,我的 Build Gradle 遇到了问题,我收到了这些错误

Error:(114, 22) Failed to resolve: com.android.support.test.espresso:espresso-core:27.0.2
Error:(115, 22) Failed to resolve: com.android.support.test.espresso:espresso-intents:27.0.2

我的buildgradle是

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
flavorDimensions "1"
lintOptions {
checkReleaseBuilds true
lintConfig file("lint.xml")

}


defaultConfig {
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

signingConfigs{
release{
keyAlias 'your app name'
keyPassword 'key password'
storeFile file('location of your key file')
storePassword 'your keystore password'
}
}

productFlavors {
madani {
applicationId "com.herocode.quranreaderandroid"
}


}

buildTypes {
beta {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
signingConfig signingConfigs.release
versionNameSuffix "-beta"
if (project.hasProperty('disableCrashlytics')) {
ext.enableCrashlytics = false
}
}

debug {
ext.enableCrashlytics = false
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
}

release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
signingConfig signingConfigs.release
if (project.hasProperty('disableCrashlytics')) {
ext.enableCrashlytics = false
}
}
}

applicationVariants.all { variant ->
resValue "string", "authority", applicationId + '.data.QuranDataProvider'
resValue "string", "file_authority", applicationId + '.fileprovider'
if (applicationId.endsWith("debug")) {
mergedFlavor.manifestPlaceholders = [app_debug_label: "Quran " + flavorName.capitalize()]
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

testOptions.unitTests.all {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
outputs.upToDateWhen { false }
showStandardStreams true
exceptionFormat "full"
}
}
}

ext {
supportLibVersion = '27.0.2'
espressoVersion = '2.2.2'
}

dependencies {
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'io.reactivex.rxjava2:rxjava:2.0.4'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.8'
compile 'com.google.dagger:dagger:2.8'
compile 'com.squareup.okhttp3:okhttp:3.7.0'
compile 'com.squareup.moshi:moshi:1.3.1'
compile 'com.jakewharton.timber:timber:4.5.0'
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
debugCompile 'com.facebook.stetho:stetho:1.4.1'
debugCompile 'com.facebook.stetho:stetho-okhttp3:1.4.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
testCompile 'junit:junit:4.12'
testCompile 'com.google.truth:truth:0.30'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'com.squareup.okhttp3:mockwebserver:3.5.0'
androidTestCompile 'com.android.support.test.espresso:espresso-core:27.0.2'
androidTestCompile 'com.android.support.test.espresso:espresso-intents:27.0.2'
androidTestCompile 'com.android.support:support-annotations:27.0.2'
compile('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
transitive = true
}
compile 'com.google.android.gms:play-services-ads:11.8.0'
}

项目构建就像

buildscript {
repositories {
google()
maven {
url "https://maven.google.com"
}
jcenter()
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'io.fabric.tools:gradle:1.22.1'
classpath 'me.tatarka:gradle-retrolambda:3.4.0'
classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
}

// Exclude the version that the android plugin depends on.
configurations.classpath.exclude group: 'com.android.tools.external.lombok'
}

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

最佳答案

正确的依赖项是:

androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-intents:3.0.1'

检查这个doumentation

关于java - 无法解析 : com. android.support.test.espresso :espresso-intents:27. 0.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48448329/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com