Partage
  • Partager sur Facebook
  • Partager sur Twitter

recycler_menu.setHasFixedSize(true);

DrawerLayout_View

    16 octobre 2018 à 15:23:03

    Bonjour à tous j'ai un problème dont je n'arrive pas à identifier la source.

    Merci de vouloir m'apporter votre aide

    c'est l'erreur qui apparaît lorsque j'exécute l'application (on me dit que votre application s'est arrêtée). Dans logcat, lorsque je clique sur la classe affichée, elle me renvoie à l'instruction suivante: recycle_menu.setHasFixedSize (true);

    voici le contenu de mon logcat

    10-16 13:08:37.395 12000-12000/com.bethel.myf.bethelrestau E/SensorManager: thread start

    10-16 13:08:37.555 12000-12000/com.bethel.myf.bethelrestau E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

    10-16 13:08:37.555 12000-12000/com.bethel.myf.bethelrestau E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

    10-16 13:08:43.471 12000-12000/com.bethel.myf.bethelrestau E/dalvikvm: Could not find class 'android.support.v4.widget.DrawerLayout$1', referenced from method android.support.v4.widget.DrawerLayout.<init>

    10-16 13:08:43.481 12000-12000/com.bethel.myf.bethelrestau E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method android.support.v4.widget.DrawerLayout.onDraw

    10-16 13:08:43.491 12000-12000/com.bethel.myf.bethelrestau E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method android.support.v4.widget.DrawerLayout.onMeasure

    10-16 13:08:43.491 12000-12000/com.bethel.myf.bethelrestau E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method android.support.v4.widget.DrawerLayout.onMeasure

    10-16 13:08:43.792 12000-12000/com.bethel.myf.bethelrestau E/AndroidRuntime: FATAL EXCEPTION: main

        java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bethel.myf.bethelrestau/com.bethel.myf.bethelrestau.Home}: java.lang.NullPointerException

            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2092)

            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117)

            at android.app.ActivityThread.access$700(ActivityThread.java:134)

            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218)

            at android.os.Handler.dispatchMessage(Handler.java:99)

            at android.os.Looper.loop(Looper.java:137)

            at android.app.ActivityThread.main(ActivityThread.java:4867)

            at java.lang.reflect.Method.invokeNative(Native Method)

            at java.lang.reflect.Method.invoke(Method.java:511)

            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)

            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)

            at dalvik.system.NativeStart.main(Native Method)

         Caused by: java.lang.NullPointerException

            at com.bethel.myf.bethelrestau.Home.onCreate(Home.java:79)

            at android.app.Activity.performCreate(Activity.java:5047)

            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)

            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2056)

            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117) 

            at android.app.ActivityThread.access$700(ActivityThread.java:134) 

            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218) 

            at android.os.Handler.dispatchMessage(Handler.java:99) 

            at android.os.Looper.loop(Looper.java:137) 

            at android.app.ActivityThread.main(ActivityThread.java:4867) 

            at java.lang.reflect.Method.invokeNative(Native Method) 

            at java.lang.reflect.Method.invoke(Method.java:511) 

            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007) 

            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774) 

            at dalvik.system.NativeStart.main(Native Method) 


    • Partager sur Facebook
    • Partager sur Twitter
      5 novembre 2018 à 9:25:09

      Salut,

      Tu as une exception de type NullPointerException à la ligne 79 de ta classe Home.java.

      Peux-tu poster le contenu du fichier et préciser la ligne 79 ?

      • Partager sur Facebook
      • Partager sur Twitter

      recycler_menu.setHasFixedSize(true);

      × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
      × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
      • Editeur
      • Markdown