No static method setOnApplyWindowInsetsListener ex

2019-01-15 18:32发布

I downloaded yesterday Android Studio 2.1.3 (before I worked with 1.5) and now I have this exception:

java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener(Landroid/view/View;Landroid/support/v4/view/OnApplyWindowInsetsListener;)V in class Landroid/support/v4/view/ViewCompatLollipop; or its super classes (declaration of 'android.support.v4.view.ViewCompatLollipop'

that stops my app on setContentView in the MainActivity. How can I solve this?

7条回答
女痞
2楼-- · 2019-01-15 19:13

here is the issue :

i also faced this this issue once, and i found that i was using invalid dependency in my gradle :

compile 'com.android.support:design:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:support-v4:24.2.1'

use this version of design or some other library, it solved my problem.

Thanks

查看更多
登录 后发表回答