Android SearchView does not work

前端 未结 8 1712
心在旅途
心在旅途 2021-01-11 17:25

I tried to update all the libraries, but i still got errors. I am able to run the app on the simulator, but when I export the APK and run it on a real android device, the ap

相关标签:
8条回答
  • 2021-01-11 18:14

    I had to add this and now it works smooth:

    -keep class android.support.v7.widget.SearchView {
       public <init>(android.content.Context);
       public <init>(android.content.Context, android.util.AttributeSet);
    }
    -keep interface android.support.v7.widget.SearchView {
       public <init>(android.content.Context);
       public <init>(android.content.Context, android.util.AttributeSet);
    }
    
    0 讨论(0)
  • 2021-01-11 18:15

    After long hours of research a simple solution of this problem i.e just add

    -keep class android.support.v7.widget.SearchView { *; }
    

    in app/proguard/android.proguard file of AndroidStudio.

    Cheers!

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