cannot access DialogStyle

前端 未结 7 2425
南旧
南旧 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:38

    I am using the work around found here https://code.google.com/p/android/issues/detail?id=175086#c9

    I modified my build.gradle file to say the following in the dependencies section:

    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile ('com.android.support:appcompat-v7:22.2.0') {
        exclude module: 'support-v4'
    }
    compile ('com.android.support:gridlayout-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'
    }
    

    You will also have to exclude it from any other dependencies that use the support library like dagger or facebook.

    Then, I added the android-support-v4.jar file found in $ANDROID_HOME/extras/android/support/v4 to my libs directory, as that file does seem to have DialogFragment$DialogStyle.

    Now, my build is fully working again, but I still hope this can get fixed soon.

    0 讨论(0)
提交回复
热议问题