小编Agh*_*es 的帖子

错误:膨胀类 androidx.appcompat.widget.SearchView 时出错

希望你们一切都好。我正在开发一个Android应用程序,该应用程序使用searchview从Firebase关系数据库medications info db中搜索数据,在我打开包含SearchView的活动后,应用程序崩溃,经过调试后我得到了这个:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.projetfe, PID: 26491
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.projetfe/com.example.projetfe.MedicamentActivity}: android.view.InflateException: Binary XML file line #27: Binary XML file line #27: Error inflating class androidx.appcompat.widget.SearchView
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3114)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7050)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
     Caused by: android.view.InflateException: Binary XML file line #27: Binary XML file line #27: Error inflating class androidx.appcompat.widget.SearchView
     Caused by: android.view.InflateException: Binary XML file …
Run Code Online (Sandbox Code Playgroud)

android searchview android-debug

5
推荐指数
1
解决办法
1363
查看次数

标签 统计

android ×1

android-debug ×1

searchview ×1