cannot access DialogStyle

前端 未结 7 2465
南旧
南旧 2021-02-12 04:10

After updating android-support library to 22.2.0 project stopped compiling.

error: cannot access DialogStyle
  class file for android.s         


        
7条回答
  •  我寻月下人不归
    2021-02-12 04:23

    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')
    

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

提交回复
热议问题