android studio无法解决:亚军,但无法解决:espresso-core,但无法解决:监控 [英] android studio failed to resolve: runner and failed to resolve: espresso-core and failed to resolve: monitor

查看:287
本文介绍了android studio无法解决:亚军,但无法解决:espresso-core,但无法解决:监控的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了android studio 3.1.3,当我尝试构建新的应用程序时..在gradle同步过程中,我遇到了如下图所示的问题:

I installed android studio 3.1.3 and when I tried to build a new application .. During the gradle synchronization I had a problem as in the following picture:

无法解决:浓缩咖啡 打开文件

Failed to resolve: espresso-core Open File

无法解决:亚军 打开文件

Failed to resolve: runner Open File

无法解决:监控 打开文件

Failed to resolve: monitor Open File

这就是我的应用程序(build.gradle):

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.tareq.ds"
        minSdkVersion 28
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
    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'
}

那是我的项目(build.gradle):

buildscript {

    repositories {
        google()
        mavenCentral()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'


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

allprojects {
    repositories {
        google()
        mavenCentral()

    }
}

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

推荐答案

请按照以下步骤操作:

  • 打开应用程序的模块设置
  • 在依赖项下,选项卡单击"+"符号并添加所有必需的 一对一的依赖
  • 单击应用"按钮
  • Open Module setting for the application
  • Under dependencies, tab Click on '+' Symbol and add all the required dependencies one by one
  • Click on Apply button

这篇关于android studio无法解决:亚军,但无法解决:espresso-core,但无法解决:监控的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆