我知道这个问题在这里被问过几次,但我从他们给出的答案中尝试的一切对我来说都不起作用。
另外我需要提到的是,我已经尝试过 File - Invilidate Cache and Restart 但它没有用..
这是我的构建 gradle(可能有问题):
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.dusandimitrijevic.geomondo"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.github.manuelpeinado.fadingactionbar:fadingactionbar:3.1.2'
}
最佳答案
我看到了三个问题。
- 您的
targetSdkVersion
高于您的compileSdkVersion
。 - 您使用的支持库版本至少需要 API 22 才能编译。
- 您没有指定 recyclerview 的版本,因此它将导入最新版本,这需要 API 23 才能编译。
解决方法是将 compileSdkVersion
设置为 23。这应该可以解决您丢失的符号问题。
关于android - 无法在 Android Studio 中解析符号,代码没问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33003829/