本文介绍了同步 android gradle appcompat 27.0.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 android studio 的新手,不确定 gradle 设置.我已经下载了 Android API 27.

I am new to android studio and not sure about gradle settings. I have downloaded Android API 27.

这是我得到的错误:

错误:无法解析:app@debug/compileClasspath"的依赖关系:无法解析 com.android.support:appcompat-v7:27.0.1.

这是 build.gradle(项目):

this is build.gradle (project):

all sub-projects/modules.
    buildscript {
        repositories {
            jcenter()
            google()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.1'
        }
    }

    allprojects {
        repositories {
            jcenter()
            google()
        }
    }

这是 build.gradle(模块应用)

and this is build.gradle (Module app)

apply plugin: 'com.android.application'

def var = android {
    compileSdkVersion 27
    buildToolsVersion "27.0.1"

    defaultConfig {
        applicationId "com.sample.sample"
        minSdkVersion 13
        targetSdkVersion 26
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
var

dependencies {
    compile 'com.android.support:appcompat-v7:27.0.1'
}

这是我使用的可用 SDK 工具:

and this is available SDK tools I use:

推荐答案

在项目部分删除 .gradle 文件.然后清理项目重新运行.

Delete .gradle file in project section. thn clean project-reuild-run.

这篇关于同步 android gradle appcompat 27.0.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 16:34