You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
updateConfiguration() method is called from the parent constructor, so our baseResources is not initialized yet and we get a NPE using it
Caused by: java.lang.NullPointerException:Attempt to invoke virtual method 'void android.content.res.Resources.updateConfiguration(android.content.res.Configuration, android.util.DisplayMetrics)' on a nullobject reference
at com.jcminarro.philology.PhilologyResources.updateConfiguration(PhilologyResources.kt:65)
at android.content.res.Resources.<init>(Resources.java:257)
at android.content.res.Resources.<init>(Resources.java:234)
at com.jcminarro.philology.PhilologyResources.<init>(PhilologyResources.kt:25)
at com.jcminarro.philology.PhilologyContextWrapper$res$2.invoke(PhilologyContextWrapper.kt:17)
at com.jcminarro.philology.PhilologyContextWrapper$res$2.invoke(PhilologyContextWrapper.kt:11)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.jcminarro.philology.PhilologyContextWrapper.getRes(PhilologyContextWrapper.kt)
at com.jcminarro.philology.PhilologyContextWrapper.getResources(PhilologyContextWrapper.kt:21)
at android.content.ContextWrapper.getResources(ContextWrapper.java:86)
at android.content.ContextWrapper.getResources(ContextWrapper.java:86)
at android.view.ContextThemeWrapper.getResources(ContextThemeWrapper.java:74)
at androidx.appcompat.app.AppCompatActivity.getResources(AppCompatActivity.java:543)
at android.view.Window.getDefaultFeatures(Window.java:1306)
at android.view.Window.<init>(Window.java:453)
at com.android.internal.policy.impl.PhoneWindow.<init>(PhoneWindow.java:290)
at com.android.internal.policy.impl.Policy.makeNewWindow(Policy.java:60)
at com.android.internal.policy.PolicyManager.makeNewWindow(PolicyManager.java:57)
at android.app.Activity.attach(Activity.java:5932)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2259)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(NativeMethod)
updateConfiguration()
method is called from the parent constructor, so ourbaseResources
is not initialized yet and we get a NPE using itOriginally posted by @antercepter in #29
The text was updated successfully, but these errors were encountered: