相关疑难解决方法(0)

95
推荐指数
6
解决办法
10万
查看次数

无法解决Android Studio新项目中的com.android.support:appcompat-v7:26.1.0

我知道这个问题:

无法解决:com.android.support:cardview-v7:26.0.0 android

无法解析com.android.support:appcompat-v7:26.1.0 [重复]

我读过这些文件:

迁移到Gradle 3.0.0的Android插件

迁移到Android 8.0

所以我发布这个问题,认为它不是重复的.

我安装了Android Studio 3.0.1.之前我没有任何以前的版本,我开始了一个新项目.

Gradle文件中的每个设置都是由Android Studio自己设置的,我已经对它们进行了全部检查.

这些是文件内容:

build.gradle(模块:app)

    apply plugin: 'com.android.application'

    android {
        compileSdkVersion 26
        defaultConfig {
            applicationId "com.example.administrator.as301test"
            minSdkVersion 16
            targetSdkVersion 26
            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:26.1.0'
        implementation 'com.android.support.constraint:constraint-layout:1.0.2'
        implementation 'com.android.support:design:26.1.0'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.1'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    }
Run Code Online (Sandbox Code Playgroud)

顶级build.gradle

buildscript {

    repositories {
        google()
        jcenter()
    } …
Run Code Online (Sandbox Code Playgroud)

android android-gradle-plugin android-studio-3.0

28
推荐指数
4
解决办法
9万
查看次数