jasmine jas
-
Modifié par BunoCS le 6/06/2016 à 15:12
BunoCS
Messages postés15472Date d'inscriptionlundi 11 juillet 2005StatutModérateurDernière intervention25 mars 2024
-
6 juin 2016 à 15:12
Bonjour,
alors se que j’essaye de réaliser est de choisir une données dans le spinner et l’envoyer a la base dans le serveur voici mon code pour mieux comprendre ,
se code m'affiche les données mais de l'envoyer a la base s marche pas
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true;
}
}
dés que je clic sur le button pour envyer la données choisi , j'aurai les erreur suivante
06-06 12:52:49.755 904-904/riro15.exemple_web_service E/Fail 1﹕ 3 06-06 12:52:49.755 904-904/riro15.exemple_web_service E/Fail 1﹕ 4 06-06 12:52:49.775 904-904/riro15.exemple_web_service E/Pass 1﹕ connection success 06-06 12:52:58.626 904-916/riro15.exemple_web_service E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1 java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:200) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274) at java.util.concurrent.FutureTask.setException(FutureTask.java:125) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) at java.lang.Thread.run(Thread.java:1019) Caused by: java.lang.NullPointerException at riro15.exemple_web_service.petitessai$CreateNew.doInBackground(petitessai.java:197) at riro15.exemple_web_service.petitessai$CreateNew.doInBackground(petitessai.java:183) at android.os.AsyncTask$2.call(AsyncTask.java:185) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) at java.lang.Thread.run(Thread.java:1019) 06-06 12:53:02.455 904-904/riro15.exemple_web_service E/WindowManager﹕ Activity riro15.exemple_web_service.petitessai has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40573668 that was originally added here android.view.WindowLeaked: Activity riro15.exemple_web_service.petitessai has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40573668 that was originally added here at android.view.ViewRoot.<init>(ViewRoot.java:258) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) at android.view.Window$LocalWindowManager.addView(Window.java:424) at android.app.Dialog.show(Dialog.java:241) at riro15.exemple_web_service.petitessai$CreateNew.onPreExecute(petitessai.java:191) at android.os.AsyncTask.execute(AsyncTask.java:391) at riro15.exemple_web_service.petitessai$1.onClick(petitessai.java:75) at android.view.View.performClick(View.java:2485) at android.view.View$PerformClick.run(View.java:9080) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3683) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) at dalvik.system.NativeStart.main(Native Method)
BunoCS
Messages postés15472Date d'inscriptionlundi 11 juillet 2005StatutModérateurDernière intervention25 mars 2024103 6 juin 2016 à 15:12
Hello,
As-tu essayé en mode debug pas-à-pas pour voir ce qu'il se passe?
Tu ne passes pas de paramètres à ton AsyncTask...or, d'après la signature, tu devrais lui passer des Strings.