benwtrent / janus-gateway-android

This is an API wrapper that utilizes the native WebRTC build and is made to ease communication with the janus-gateway
MIT License
112 stars 73 forks source link

ExceptionInitializerError in JanusServer Attach() method #22

Open Lex74 opened 7 years ago

Lex74 commented 7 years ago

java.lang.ExceptionInitializerError (JanusServer.java:157) I've got this error on Android 4.0.4. With 7.1.1 works fine. Occurs cuz AsyncTask creates inside of Runnable. Workaround for this:

private Handler handler = new Handler(Looper.getMainLooper());

handler.post(new Runnable() { public void run() { new AsyncAttach().execute(callbacks); } });