And*_*idP 9 android android-support-library android-studio
我希望有人可以对这个问题有所了解.我正在尝试更改支持库版本:
compile 'com.android.support:support-annotations:23.1.0'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:support-v13:23.1.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
Run Code Online (Sandbox Code Playgroud)
至
compile 'com.android.support:support-annotations:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:support-v13:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
Run Code Online (Sandbox Code Playgroud)
通常看起来像一个简单的小升级已经让我整整一天.基本上在更新gradle.build文件时,我同步 - >清理,并且在IDE上出现了一堆无法解析符号错误,用于支持库中的类.
更有趣的是,如果我尝试通过adb在我的手机上运行代码,尽管AS显示为"无法解析符号",它在我的手机上运行完全正常.
在我试过的事情中:
进一步深入到构建目录中,它们在两者中都是相似的
建立\中间体\分解-AAR\com.android.support \程序兼容性-V7\23.1.0 \罐\ classes.jar
和
建立\中间体\分解-AAR\com.android.support \程序兼容性-V7\23.1.1 \罐\ classes.jar
分别是生成的.不同的是,在AS中,对于以前的版本,"classes.jar"可以在AS中打开,与新版本一样,它们不能在AS中打开.
我觉得我已经筋疲力尽了所有可用的选项,所以如果有人能说明如何解决这个问题,我会非常感激.
我的完整gradle.build文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.XXX"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.1.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(path: ':XXX', configuration: 'android-endpoints')
testCompile 'junit:junit:4.12'
compile 'com.google.code.gson:gson:2.4'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.balysv:material-ripple:1.0.2'
compile 'net.sf.flexjson:flexjson:3.3'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.android.support:support-annotations:23.1.0'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:support-v13:23.1.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
}
Run Code Online (Sandbox Code Playgroud)