更新 Android的支持
库 22.2.0
项目停止后编制。
After updating android-support
library to 22.2.0
project stopped compiling.
error: cannot access DialogStyle
class file for android.support.v4.app.DialogFragment$DialogStyle not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for android.support.v4.app.DialogFragment$DialogStyle not found
找不到如何解决这个问题。
Can't find how to work around this issue.
previously使用的版本是 22.1.1
Previously used version was 22.1.1
试试这个,它解决了我的问题:
Try this, it resolved my issue:
compile ('com.android.support:appcompat-v7:22.2.0') {
exclude module: 'support-v4' }
compile ('com.android.support:recyclerview-v7:22.2.0') {
exclude module: 'support-v4' }
compile ('com.android.support:cardview-v7:22.2.0') {
exclude module: 'support-v4' }
compile ('com.android.support:design:22.2.0') {
exclude module: 'support-v4' }
// and exclude support-v4 from other dependencies as well that might include it
// finally add it, but avoid version 22.2.0...
compile ('com.android.support:support-v4:22.1.1')
没有必要的支持-V4磁带库手动添加到您的libs目录,上次导入确保正确的版本包含在您的项目。
There is no need to manually add the support-v4 library to your libs directory, the last import ensures that the right version is included in your project.
顺便说一句这一切的解决办法是不是你的错,责怪别人:)
BTW all of this workaround is not your fault, blame others :)