Wątek - nie można utworzyć obsługi wewnątrz wątku, który nie nazywał się Looper.prepare ()
Używam starszego kodu i podczas uruchamiania tej metody otrzymuję błąd Looper.prepare (). Nie rozumiem, co oznacza ta linia, ale jest to bardzo potrzebne.
Ogólny program: Mam AsyncTask, który wywołuje metodę wywołującą doBindService () - z doInBackground () -. Przeczytałem wiele innych pytań dotyczących tego błędu i myślę, że mam błąd w wątkowaniu, ale nie wiem, o co chodzi.
public rNOC doBindService(){
_server = new rNOC(this);//CODE FAILING HERE
return _server;
}
*** Uncaught remote exception! (Exceptions are not yet supported across processes.)
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.<init>(Handler.java:197)
at android.os.Handler.<init>(Handler.java:111)
at com.servicenexus.ServiceNexus$1.<init>(ServiceNexus.java:128)
at com.servicenexus.ServiceNexus.<init>(ServiceNexus.java:128)
at com.servicenexus.rNOC.<init>(rNOC.java:31)
at com.servicenexus.ServiceNexus.doBindService(ServiceNexus.java:406)
at com.servicenexus.ServiceNexus$2.login(ServiceNexus.java:790)
at com.servicenexus.IRemoteInterface$Stub.onTransact(IRemoteInterface.java:126)
at android.os.Binder.execTransact(Binder.java:351)
at dalvik.system.NativeStart.run(Native Method)