java.lang.NoSuchFieldError: android.support.v7.appcompat

前端 未结 3 615
我寻月下人不归
我寻月下人不归 2021-02-10 11:41

I updated my support library from r20 to r21, now when I run my app I get this error in super.onCreate of my main activity :

java.lang.NoSuchFieldE         


        
相关标签:
3条回答
  • 2021-02-10 11:53

    I have compared support_v7_appcompat (version 20) with support_v7_appcompat (version 21). In res/values/attrs.xml (version 21), windowActionBar attributes are not in <declare-styleable name="Theme">

    0 讨论(0)
  • 2021-02-10 11:55

    if you use intellij => you have to add in /project strutures/modules/ => YOURSDK\extras\android\support\v7\appcompat and add after in your project like that you have always the last support

    0 讨论(0)
  • 2021-02-10 12:13

    It happened same to me when I update SDK. If you have version 21 of library "Android Support Library" this bug occurs. I don't know what is the reason but last release make this bug.

    You can solve it by downloading previous version of "Android Support Library" (r20) from here: https://dl-ssl.google.com/android/repository/support_r20.zip, and using it in your project.

    You are welcome!

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