问题
After the update to Android DropBox SDK 4.1.0 my application most of the time crashes with:
MapboxEventManager: Error Trying to load Staging Credentials: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference
and no stack trace.
MapBox example on https://github.com/mapbox/mapbox-android-demo crashes with the same error (both compiled locally and downloaded from Google Play).
Is this known problem? Is there any way to avoid this error?
回答1:
This is a known issue, for now you can try clearing the apps cache. Switching the map style url to a different one will potentially fix the issue as well. A bug fix will be out later today for iOS and Android, you can follow the Android release here.
EDIT:
4.1.1 has now been released, you can upgrade in your Grade file. More information can be found here.
回答2:
I had the same error, beside that, I had : OfflineManager: Failed to read the storage key: null
So both error message refer to same problem. The solution is clear apps cache. As cammace said, it solve my problem.
来源:https://stackoverflow.com/questions/38455165/mapbox-android-application-crashes-after-update-to-sdk-4-1-0-when-loading-creden