将android-support
库更新为22.2.0
项目后,停止编译。
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
找不到解决此问题的方法。
先前使用的版本为 22.1.1
试试这个,它解决了我的问题:
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')
无需手动将support-v4库添加到您的libs目录中,最后一次导入可确保您的项目中包含正确的版本。
顺便说一句,所有这些解决方法不是您的错,请怪其他人:)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句