我一直在尝试用带有AndroidSlidingUpPanel libary的Navigation Drawer设置android项目,但我似乎无法让它工作
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@android:style/Theme.Holo.Light" >
<!-- Framelayout pre zobrazovanie jednotlivých fragmentov -->
<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.sothree.slidinguppanel.SlidingUpPanelLayout
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom" >
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="Main Content"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|top"
android:text="The Awesome Sliding Up Panel"
android:textSize="16sp" />
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
<!-- Listview ako menu pre navDrawer -->
<ListView
android:id="@+id/list_slidermenu"
android:layout_width="240dp"
android:layout_height="fill_parent"
android:layout_gravity="start"
android:background="#2B2B2B"
android:divider="@null"
android:dividerHeight="0dp" />
</android.support.v4.widget.DrawerLayout>
我已将libary复制到eclipse项目,将其包含在当前项目中但仍然总是崩溃。我在这里错过了什么?无论如何,如果有人也可以为我提供编译的jar文件,我也会很高兴:)
04-07 19:40:21.275: E/AndroidRuntime(30096): FATAL EXCEPTION: main
04-07 19:40:21.275: E/AndroidRuntime(30096): Process: com.kulturnepodujatia, PID: 30096
04-07 19:40:21.275: E/AndroidRuntime(30096): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kulturnepodujatia/com.kulturnepodujatia.DashboardActivity}: android.view.InflateException: Binary XML file line #14: Error inflating class com.sothree.slidinguppanel.SlidingUpPanelLayout
04-07 19:40:21.275: E/AndroidRuntime(30096): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2215)
04-07 19:40:21.275: E/AndroidRuntime(30096): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
04-07 19:40:21.275: E/AndroidRuntime(30096): at android.app.ActivityThread.access$800(ActivityThread.java:145)
04-07 19:40:21.275: E/AndroidRuntime(30096): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
04-07 19:40:21.275: E/AndroidRuntime(30096): at android.os.Handler.dispatchMessage(Handler.java:102)
04-07 19:40:21.275: E/AndroidRuntime(30096): at android.os.Looper.loop(Looper.java:136)
04-07 19:40:21.275: E/AndroidRuntime(30096): at android.app.ActivityThread.main(ActivityThread.java:5081)
04-07 19:40:21.275: E/AndroidRuntime(30096): at java.lang.reflect.Method.invokeNative(Native Method)
04-07 19:40:21.275: E/AndroidRuntime(30096): at java.lang.reflect.Method.invoke(Method.java:515)
04-07 19:40:21.275: E/AndroidRuntime(30096): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
答案 0 :(得分:0)
右键点击项目 - &gt;属性 - &GT; java构建路径 - &gt;订单和支持 - &gt;检查您正在使用的库
清洁项目(新建/安装)
它应该有用