java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener

后端 未结 2 965
一生所求
一生所求 2020-11-30 12:15

I upgraded my android studio to 2.1.3. And now I am getting following error

java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener(Lan         


        
2条回答
  •  被撕碎了的回忆
    2020-11-30 12:50

    I upgraded my android studio to 2.1.3. And now I am getting following error

    I am also suffering with same issue. But I was resolved as the following way.

    Reason of this exception is AppcompatActivity derived from the v7 library. so we should provide proper library based on your gradle and SDK.

    1. should update the dependency Libraries also.
    2. Right click on the project in the project structure -> select Open module settings and select dependencies tab -> Library module-> then type which library you want add to the project. It shows the latest libraries based on your gradle updated version, then select latest one and remove the existing one.

    For example In my project "appcompat-v7" version is 23.4.0 then I was changed to 24.2.0.

提交回复
热议问题