"Backendless application not initialized" crash after Backendless update

Hello,
After updating Backendless for Android to version 5.0.2 the application crashes immediately after launch with the following stacktrace:

E/AndroidRuntime: FATAL EXCEPTION: pool-4-thread-1
Process: com.calipso.rentier, PID: 31126
java.lang.ExceptionInInitializerError
at com.backendless.HeadersManager.getInstance(HeadersManager.java:38)
at com.backendless.Invoker.invokeSync(Invoker.java:95)
at com.backendless.Invoker$1.run(Invoker.java:71)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.IllegalStateException: Backendless application was not initialized
at com.backendless.AndroidBackendlessPrefs.restoreAuthKeysFromPreferences(AndroidBackendlessPrefs.java:126)
at com.backendless.AndroidBackendlessPrefs.getAuthKeys(AndroidBackendlessPrefs.java:118)
at com.backendless.AndroidBackendlessPrefs.getApplicationId(AndroidBackendlessPrefs.java:52)
at com.backendless.Backendless.getApplicationId(Backendless.java:234)
at com.backendless.AndroidHeadersManager.<init>(AndroidHeadersManager.java:34)
at com.backendless.AndroidHeadersManager.getInstance(AndroidHeadersManager.java:22)
at com.backendless.HeadersManager.<clinit>(HeadersManager.java:28)
at com.backendless.HeadersManager.getInstance(HeadersManager.java:38)
at com.backendless.Invoker.invokeSync(Invoker.java:95)
at com.backendless.Invoker$1.run(Invoker.java:71)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

The exception occurs always during debug attempt and sometimes after run launch. Reinstalling app didn’t work.

it occurs because you try to use backendless api before call Backendless.initApp method

Backendless.initApp(this,
APPLICATION_ID,
API_KEY);
replace getApplicationContext() with this
Backendless.setUrl(SERVER_URL); delete this line of code