【问题标题】:Android Studio Beta "Cannot resolve symbol" for all the resources所有资源的 Android Studio Beta“无法解析符号”
【发布时间】:2014-07-23 09:27:09
【问题描述】:

我已从早期的 0.6.x 版本升级到 Android Studio Beta (0.8.0) 版本。升级所有项目(之前工作的)后,所有项目(字符串、活动、文件、视图)都抛出错误“无法解析符号”。我已经完成了清理和重建;

显然我在升级过程中遗漏了一些东西;那会是什么?

而我的 settings.gradle 是:

buildscript {
    repositories {
       mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:0.12.+'
}
}


apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion "19.1.0"

defaultConfig {
    applicationId "com.grabdata.gdlea.apps"
    minSdkVersion 9
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),
       'proguard-rules.pro'
      }
   }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
// You must install or update the Support Repository through the SDK manager to use
  this dependency.
// You must install or update the Support Repository through the SDK manager to use 
  this dependency.
compile 'com.android.support:appcompat-v7:19.+'
 }

【问题讨论】:

  • 是的。在项目 .iml 文件中,我必须进行一项小改动并为我工作:我将 Android API 19 Platform (2) 更改为 Android API 19 Platform (3),它对我有用。我必须在所有其他有同样问题的项目中这样做。
  • 我也遇到了同样的问题,终于可以通过将compileSdkVersion从19降级到17来解决。可能和这个bug有关:code.google.com/p/android/issues/detail?id=67823

标签: android android-studio


【解决方案1】:

遇到了同样的问题。我清理并重建了项目,一切都恢复了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-15
    • 1970-01-01
    相关资源
    最近更新 更多