Autore Topic: Problemi con AndroidSlidingUpPanel  (Letto 435 volte)

Offline christian13

  • Utente junior
  • **
  • Post: 84
  • Respect: +2
    • Mostra profilo
Problemi con AndroidSlidingUpPanel
« il: 07 Novembre 2014, 19:33:52 CET »
0
Salve a tutti...Sto cercando di implementare lo slidingUpPanel come descritto nel sito

https://github.com/umano/AndroidSlidingUpPanel


Ho importato la cartella library in un nuovo progetto...Ho scritto l'xml dell'activity in questo modo (come consigliato nel sito):

Codice (XML): [Seleziona]
<com.sothree.slidinguppanel.SlidingUpPanelLayout
   xmlns:sothree="http://schemas.android.com/apk/res-auto"
   android:id="@+id/sliding_layout"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:gravity="bottom"
   sothree:panelHeight="68dp"
   sothree:shadowHeight="4dp">

    <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>


Quando avvio l'applicazione, mi crasha, indicandomi questi errori:

Codice (XML): [Seleziona]
11-07 19:22:00.716: E/AndroidRuntime(20526): FATAL EXCEPTION: main
11-07 19:22:00.716: E/AndroidRuntime(20526): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.provafinale/com.example.provafinale.MainActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class com.sothree.slidinguppanel.SlidingUpPanelLayout
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.app.ActivityThread.access$600(ActivityThread.java:140)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.os.Handler.dispatchMessage(Handler.java:99)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.os.Looper.loop(Looper.java:137)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.app.ActivityThread.main(ActivityThread.java:4895)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at java.lang.reflect.Method.invokeNative(Native Method)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at java.lang.reflect.Method.invoke(Method.java:511)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at dalvik.system.NativeStart.main(Native Method)
11-07 19:22:00.716: E/AndroidRuntime(20526): Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class com.sothree.slidinguppanel.SlidingUpPanelLayout
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.view.LayoutInflater.createView(LayoutInflater.java:613)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:306)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.app.Activity.setContentView(Activity.java:1912)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at com.example.provafinale.MainActivity.onCreate(MainActivity.java:16)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.app.Activity.performCreate(Activity.java:5163)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061)
11-07 19:22:00.716: E/AndroidRuntime(20526):    ... 11 more
11-07 19:22:00.716: E/AndroidRuntime(20526): Caused by: java.lang.reflect.InvocationTargetException
11-07 19:22:00.716: E/AndroidRuntime(20526):    at java.lang.reflect.Constructor.constructNative(Native Method)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at android.view.LayoutInflater.createView(LayoutInflater.java:587)
11-07 19:22:00.716: E/AndroidRuntime(20526):    ... 21 more
11-07 19:22:00.716: E/AndroidRuntime(20526): Caused by: java.lang.NoClassDefFoundError: android.support.v4.widget.ScrollerCompat
11-07 19:22:00.716: E/AndroidRuntime(20526):    at com.sothree.slidinguppanel.ViewDragHelper.<init>(ViewDragHelper.java:392)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at com.sothree.slidinguppanel.ViewDragHelper.create(ViewDragHelper.java:348)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at com.sothree.slidinguppanel.ViewDragHelper.create(ViewDragHelper.java:361)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at com.sothree.slidinguppanel.SlidingUpPanelLayout.<init>(SlidingUpPanelLayout.java:334)
11-07 19:22:00.716: E/AndroidRuntime(20526):    at com.sothree.slidinguppanel.SlidingUpPanelLayout.<init>(SlidingUpPanelLayout.java:263)
11-07 19:22:00.716: E/AndroidRuntime(20526):    ... 24 more
11-07 19:22:20.677: I/Process(20526): Sending signal. PID: 20526 SIG: 9
11-07 19:23:44.341: D/AndroidRuntime(20718): Shutting down VM
11-07 19:23:44.341: W/dalvikvm(20718): threadid=1: thread exiting with uncaught exception (group=0x414f52a0)
11-07 19:23:59.786: D/AndroidRuntime(20772): Shutting down VM
11-07 19:23:59.786: W/dalvikvm(20772): threadid=1: thread exiting with uncaught exception (group=0x414f52a0)
11-07 19:23:59.794: E/AndroidRuntime(20772): FATAL EXCEPTION: main
11-07 19:23:59.794: E/AndroidRuntime(20772): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.provafinale/com.example.provafinale.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class com.chenjishi.slideupdemo.SlidingUpPaneLayout
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.app.ActivityThread.access$600(ActivityThread.java:140)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.os.Handler.dispatchMessage(Handler.java:99)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.os.Looper.loop(Looper.java:137)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.app.ActivityThread.main(ActivityThread.java:4895)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at java.lang.reflect.Method.invokeNative(Native Method)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at java.lang.reflect.Method.invoke(Method.java:511)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at dalvik.system.NativeStart.main(Native Method)
11-07 19:23:59.794: E/AndroidRuntime(20772): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class com.chenjishi.slideupdemo.SlidingUpPaneLayout
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:698)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:306)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.app.Activity.setContentView(Activity.java:1912)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at com.example.provafinale.MainActivity.onCreate(MainActivity.java:16)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.app.Activity.performCreate(Activity.java:5163)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061)
11-07 19:23:59.794: E/AndroidRuntime(20772):    ... 11 more
11-07 19:23:59.794: E/AndroidRuntime(20772): Caused by: java.lang.ClassNotFoundException: com.chenjishi.slideupdemo.SlidingUpPaneLayout
11-07 19:23:59.794: E/AndroidRuntime(20772):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.view.LayoutInflater.createView(LayoutInflater.java:552)
11-07 19:23:59.794: E/AndroidRuntime(20772):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
11-07 19:23:59.794: E/AndroidRuntime(20772):    ... 20 more


Sapete il motivo?

ho provato anche a modificare la riga dell'xml
xmlns:sothree="http://schemas.android.com/apk/res-auto"


con

xmlns:sothree="http://schemas.android.com/apk/res/mioPackage"   (come letto in rete)

ma niente....


?

vi ringrazio molto....