Connexion base des donnes [Résolu/Fermé]

Signaler
-
 chayma -
bonjour
je suis débutant en android et je trouve un problème en exécution il m'affiche un message d'erreur lorsque je tape cin et nom correcte
mais lorsque l'un de deux faut la programme s'exécute correctement
et voila le logCat


03-04 09:55:44.206: W/KeyCharacterMap(280): No keyboard for id 0
03-04 09:55:44.206: W/KeyCharacterMap(280): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
03-04 09:56:04.226: D/AndroidRuntime(280): Shutting down VM
03-04 09:56:04.226: W/dalvikvm(280): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
03-04 09:56:04.306: D/dalvikvm(280): GC_FOR_MALLOC freed 3736 objects / 204000 bytes in 65ms
03-04 09:56:04.316: E/AndroidRuntime(280): FATAL EXCEPTION: main
03-04 09:56:04.316: E/AndroidRuntime(280): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.ecole/com.example.ecole.classe}: java.lang.ClassCastException: com.example.ecole.classe
03-04 09:56:04.316: E/AndroidRuntime(280): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
03-04 09:56:04.316: E/AndroidRuntime(280): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-04 09:56:04.316: E/AndroidRuntime(280): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-04 09:56:04.316: E/AndroidRuntime(280): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-04 09:56:04.316: E/AndroidRuntime(280): at android.os.Handler.dispatchMessage(Handler.java:99)
03-04 09:56:04.316: E/AndroidRuntime(280): at android.os.Looper.loop(Looper.java:123)
03-04 09:56:04.316: E/AndroidRuntime(280): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-04 09:56:04.316: E/AndroidRuntime(280): at java.lang.reflect.Method.invokeNative(Native Method)
03-04 09:56:04.316: E/AndroidRuntime(280): at java.lang.reflect.Method.invoke(Method.java:521)
03-04 09:56:04.316: E/AndroidRuntime(280): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-04 09:56:04.316: E/AndroidRuntime(280): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-04 09:56:04.316: E/AndroidRuntime(280): at dalvik.system.NativeStart.main(Native Method)
03-04 09:56:04.316: E/AndroidRuntime(280): Caused by: java.lang.ClassCastException: com.example.ecole.classe
03-04 09:56:04.316: E/AndroidRuntime(280): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
03-04 09:56:04.316: E/AndroidRuntime(280): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
03-04 09:56:04.316: E/AndroidRuntime(280): ... 11 more
03-04 09:56:25.886: W/KeyCharacterMap(289): No keyboard for id 0
03-04 09:56:25.886: W/KeyCharacterMap(289): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
03-04 09:57:04.576: D/dalvikvm(289): GC_FOR_MALLOC freed 4136 objects / 204360 bytes in 61ms
03-04 10:04:38.906: W/KeyCharacterMap(315): No keyboard for id 0
03-04 10:04:38.906: W/KeyCharacterMap(315): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
03-04 10:04:55.756: D/AndroidRuntime(315): Shutting down VM
03-04 10:04:55.756: W/dalvikvm(315): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
03-04 10:04:55.846: D/dalvikvm(315): GC_FOR_MALLOC freed 3602 objects / 200664 bytes in 75ms
03-04 10:04:55.856: E/AndroidRuntime(315): FATAL EXCEPTION: main
03-04 10:04:55.856: E/AndroidRuntime(315): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.ecole/com.example.ecole.classe}: java.lang.ClassCastException: com.example.ecole.classe
03-04 10:04:55.856: E/AndroidRuntime(315): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
03-04 10:04:55.856: E/AndroidRuntime(315): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-04 10:04:55.856: E/AndroidRuntime(315): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-04 10:04:55.856: E/AndroidRuntime(315): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-04 10:04:55.856: E/AndroidRuntime(315): at android.os.Handler.dispatchMessage(Handler.java:99)
03-04 10:04:55.856: E/AndroidRuntime(315): at android.os.Looper.loop(Looper.java:123)
03-04 10:04:55.856: E/AndroidRuntime(315): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-04 10:04:55.856: E/AndroidRuntime(315): at java.lang.reflect.Method.invokeNative(Native Method)
03-04 10:04:55.856: E/AndroidRuntime(315): at java.lang.reflect.Method.invoke(Method.java:521)
03-04 10:04:55.856: E/AndroidRuntime(315): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-04 10:04:55.856: E/AndroidRuntime(315): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-04 10:04:55.856: E/AndroidRuntime(315): at dalvik.system.NativeStart.main(Native Method)
03-04 10:04:55.856: E/AndroidRuntime(315): Caused by: java.lang.ClassCastException: com.example.ecole.classe
03-04 10:04:55.856: E/AndroidRuntime(315): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
03-04 10:04:55.856: E/AndroidRuntime(315): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
03-04 10:04:55.856: E/AndroidRuntime(315): ... 11 more
03-04 10:10:03.006: W/KeyCharacterMap(343): No keyboard for id 0
03-04 10:10:03.006: W/KeyCharacterMap(343): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
03-04 10:10:19.116: D/AndroidRuntime(343): Shutting down VM
03-04 10:10:19.116: W/dalvikvm(343): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
03-04 10:10:19.186: D/dalvikvm(343): GC_FOR_MALLOC freed 3634 objects / 201864 bytes in 62ms
03-04 10:10:19.196: E/AndroidRuntime(343): FATAL EXCEPTION: main
03-04 10:10:19.196: E/AndroidRuntime(343): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.ecole/com.example.ecole.classe}: java.lang.ClassCastException: com.example.ecole.classe
03-04 10:10:19.196: E/AndroidRuntime(343): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
03-04 10:10:19.196: E/AndroidRuntime(343): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-04 10:10:19.196: E/AndroidRuntime(343): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-04 10:10:19.196: E/AndroidRuntime(343): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-04 10:10:19.196: E/AndroidRuntime(343): at android.os.Handler.dispatchMessage(Handler.java:99)
03-04 10:10:19.196: E/AndroidRuntime(343): at android.os.Looper.loop(Looper.java:123)
03-04 10:10:19.196: E/AndroidRuntime(343): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-04 10:10:19.196: E/AndroidRuntime(343): at java.lang.reflect.Method.invokeNative(Native Method)
03-04 10:10:19.196: E/AndroidRuntime(343): at java.lang.reflect.Method.invoke(Method.java:521)
03-04 10:10:19.196: E/AndroidRuntime(343): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-04 10:10:19.196: E/AndroidRuntime(343): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-04 10:10:19.196: E/AndroidRuntime(343): at dalvik.system.NativeStart.main(Native Method)
03-04 10:10:19.196: E/AndroidRuntime(343): Caused by: java.lang.ClassCastException: com.example.ecole.classe
03-04 10:10:19.196: E/AndroidRuntime(343): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
03-04 10:10:19.196: E/AndroidRuntime(343): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
03-04 10:10:19.196: E/AndroidRuntime(343): ... 11 more
03-04 10:10:27.576: I/Process(343): Sending signal. PID: 343 SIG: 9

1 réponse

Messages postés
14827
Date d'inscription
lundi 11 juillet 2005
Statut
Modérateur
Dernière intervention
1 octobre 2020
2 579
Hello,

03-04 10:10:19.196: E/AndroidRuntime(343): Caused by: java.lang.ClassCastException: com.example.ecole.classe 

L'erreur est ici...mais pas possible d'en dire plus sans code
merci beaucoup .ça marche bien