不能访问DialogStyle [英] cannot access DialogStyle

查看:147
本文介绍了不能访问DialogStyle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新 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 :)

这篇关于不能访问DialogStyle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆