gpt4 book ai didi

android - 错误膨胀类 com.sothree.slidinguppanel.SlidingUpPanelLayout

转载 作者:行者123 更新时间:2023-11-29 14:37:20 27 4
gpt4 key购买 nike

我正在使用 umano's SlidingUpPanel library在我的项目中,但是当我尝试运行该应用程序时,出现了 InflateException

android.view.InflateException: Binary XML file line #1: Error inflating class com.sothree.slidinguppanel.SlidingUpPanelLayout

这是我的布局

<com.sothree.slidinguppanel.SlidingUpPanelLayout 
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_main"
android:layout_gravity="bottom">

<CalendarView
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- other layout -->
</RelativeLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>

这是我的gradle依赖

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.google.android.gms:play-services:6.1.71') {
exclude module: 'support-v4'
}
compile 'com.sothree.slidinguppanel:library:3.0.0'
compile 'com.google.guava:guava-collections:r03'
compile 'com.roomorama:caldroid:1.1.8'
}

我做错了什么?

最佳答案

根据之前的评论:

根据我所见,您可能忘记设置强制属性 android:gravity="bottom|top"(选择一个),或者您可能将其与当前设置的 android:layout_gravity="bottom" 属性?

正确的重力属性应该像这样设置:

<com.sothree.slidinguppanel.SlidingUpPanelLayout 
...
android:gravity="bottom"
...
>

...

</com.sothree.slidinguppanel.SlidingUpPanelLayout>

关于android - 错误膨胀类 com.sothree.slidinguppanel.SlidingUpPanelLayout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29362856/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com