【问题标题】:Android Studio - No Resource found that matches the nameAndroid Studio - 找不到与名称匹配的资源
【发布时间】:2018-03-08 08:10:32
【问题描述】:

我在 Android Studio 中遇到问题

我尝试将最新的构建工具版本更新为27.0.1,并将 SDK 版本更新为28,但它会引发异常

更新:

下面我已经提到了app级build.gradle文件内容,

apply plugin: 'com.android.application'
android {
    compileSdkVersion 28
    buildToolsVersion '27.0.1'

    dexOptions {
        jumboMode true
        javaMaxHeapSize "4g"
    }

    defaultConfig {
        applicationId "XXXX.XXXX.XXXX"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 27
        versionName "1.0.19"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
    }

    aaptOptions.cruncherEnabled = false
    aaptOptions.useNewCruncher = false
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.google.firebase:firebase-messaging:11.8.0'
    compile 'com.google.firebase:firebase-crash:11.8.0'
    compile 'com.google.android.gms:play-services-gcm:11.8.0'
    compile 'com.android.support:appcompat-v7:26.0.2'
    compile 'com.android.support:design:+'
    compile 'com.liferay.mobile:liferay-screens:2.1.1'
    compile 'com.liferay.mobile:liferay-material-viewset:2.1.1'
    compile 'com.android.support:support-v4:+'
    compile 'com.android.support:recyclerview-v7:+'
    compile 'com.android.support:cardview-v7:+'
    compile 'de.hdodenhof:circleimageview:1.2.1'
    compile 'com.android.volley:volley:1.0.0'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:exifinterface:+'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.github.woxthebox:draglistview:1.5.1'
    compile 'com.github.lzyzsd:circleprogress:+'
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
    compile 'me.gujun.android.taggroup:library:1.4@aar'
    compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
    compile 'com.prolificinteractive:material-calendarview:1.4.3'
}

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
        maven { url "http://dl.bintray.com/nhpatt/liferay-mobile" }
        google()
    }
}

apply plugin: 'com.google.gms.google-services'

请任何人帮助找出解决方案。

【问题讨论】:

  • 我尝试过使用自动检测代理选项但不起作用
  • 发布你的依赖
  • @John Joe 我已经更新了我的问题。请检查一下
  • 使用SDK管理器下载

标签: android android-studio


【解决方案1】:

这似乎是 Android Studio 中的一个奇怪问题。从this 帖子中找到了解决方法。

感谢Veener 发布了实际解决问题的答案。

【讨论】:

    【解决方案2】:

    只需检查自动导入库是否正常工作。工作室是否在您的主要活动中导入所需的库

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多