小编ame*_*123的帖子

错误:无法解决:com.android.support:support-annotations:27.0.1 - Android Studio

我正在开发一个项目,2-3天前它工作正常并安装在连接到系统的设备上.但是今天我试着将它安装在设备上并出现错误,

Error:Failed to resolve: com.android.support:support-annotations:27.0.1
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:/home/sharan/Dropbox/ptfix_androidlocal/ptfix/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Run Code Online (Sandbox Code Playgroud)

还有更多的similer错误.

.见截图.这里

我的应用 Gradle Code如下.

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.1'
    defaultConfig {
        applicationId "com.ameba.ptfix"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    android {
        useLibrary 'org.apache.http.legacy'
        packagingOptions {
            exclude 'META-INF/DEPENDENCIES.txt'
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/NOTICE.txt'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/DEPENDENCIES'
            exclude …
Run Code Online (Sandbox Code Playgroud)

android gradle

8
推荐指数
0
解决办法
749
查看次数

标签 统计

android ×1

gradle ×1