Slidinguppanel Error inflating class com.sothree.slidinguppanel.SlidingUpPanelLayout 오류 해결
|2022. 5. 22. 09:46

오류 코드 전문
2022-05-22 09:43:40.236 27256-27256/com.example.bookchat E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.bookchat, PID: 27256
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.bookchat/com.example.bookchat.activities.SearchActivity}: android.view.InflateException: Binary XML file line #10 in com.example.bookchat:layout/activity_search: Binary XML file line #10 in com.example.bookchat:layout/activity_search: Error inflating class com.sothree.slidinguppanel.SlidingUpPanelLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3679)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3816)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:99)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2299)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7850)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: android.view.InflateException: Binary XML file line #10 in com.example.bookchat:layout/activity_search: Binary XML file line #10 in com.example.bookchat:layout/activity_search: Error inflating class com.sothree.slidinguppanel.SlidingUpPanelLayout
Caused by: android.view.InflateException: Binary XML file line #10 in com.example.bookchat:layout/activity_search: Error inflating class com.sothree.slidinguppanel.SlidingUpPanelLayout
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:858)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1010)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
at android.view.LayoutInflater.inflate(LayoutInflater.java:663)
at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
at android.view.LayoutInflater.inflate(LayoutInflater.java:485)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:706)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:195)
at androidx.databinding.DataBindingUtil.setContentView(DataBindingUtil.java:303)
at androidx.databinding.DataBindingUtil.setContentView(DataBindingUtil.java:284)
at com.example.bookchat.activities.SearchActivity.onCreate(SearchActivity.kt:39)
at android.app.Activity.performCreate(Activity.java:8257)
at android.app.Activity.performCreate(Activity.java:8237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1339)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3660)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3816)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:99)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2299)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7850)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
2022-05-22 09:43:40.237 27256-27256/com.example.bookchat E/AndroidRuntime: Caused by: java.lang.IllegalArgumentException: gravity must be set to either top or bottom
at com.sothree.slidinguppanel.SlidingUpPanelLayout.setGravity(SlidingUpPanelLayout.java:366)
at com.sothree.slidinguppanel.SlidingUpPanelLayout.<init>(SlidingUpPanelLayout.java:288)
at com.sothree.slidinguppanel.SlidingUpPanelLayout.<init>(SlidingUpPanelLayout.java:270)
... 29 more
Slidinguppanel을 사용하고 있는 xml파일 옵션에
android:layout_gravity="bottom"
가 아닌
android:gravity="bottom"
로 수정해야한다.