Questions marquées «android-toast»

22
Impossible de créer un gestionnaire à l'intérieur du thread qui n'a pas appelé Looper.prepare ()
Que signifie l'exception suivante? comment puis-je le réparer? Voici le code: Toast toast = Toast.makeText(mContext, "Something", Toast.LENGTH_SHORT); C'est l'exception: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.<init>(Handler.java:121) at android.widget.Toast.<init>(Toast.java:68) at android.widget.Toast.makeText(Toast.java:231)




En utilisant notre site, vous reconnaissez avoir lu et compris notre politique liée aux cookies et notre politique de confidentialité.
Licensed under cc by-sa 3.0 with attribution required.