Unable to start activity ComponentInfo,请教如何解决?

异常类型:java.lang.RuntimeException

异常信息:Unable to start activity ComponentInfo{com.example.seh/com.example.seh.TopicActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Looper android.content.Context.getMainLooper()' on a null object reference

关键方法:miui.util.AttributeResolver.r(SourceFile:35)


详细信息:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.seh/com.example.seh.TopicActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Looper android.content.Context.getMainLooper()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2432)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2492)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5458)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Looper android.content.Context.getMainLooper()' on a null object reference
at miui.util.AttributeResolver.r(SourceFile:35)
at miui.util.AttributeResolver.resolveInt(SourceFile:145)
at miui.util.AttributeResolver.isUsingMiuiTheme(SourceFile:179)
at miui.os.Environment.isUsingMiui(SourceFile:99)
at android.view.ViewConfigurationInjector.get(ViewConfigurationInjector.java:18)
at android.view.ViewConfiguration.get(ViewConfiguration.java:369)
at android.view.View.(View.java:3795)
at android.view.View.(View.java:3899)
at android.view.ViewGroup.(ViewGroup.java:574)
at android.widget.FrameLayout.(FrameLayout.java:97)
at android.widget.ScrollView.(ScrollView.java:180)
at android.widget.ScrollView.(ScrollView.java:176)
at android.widget.ScrollView.(ScrollView.java:172)
at android.widget.ScrollView.(ScrollView.java:168)
at com.example.seh.TopicFragment.onCreateView(TopicFragment.java:254)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1789)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:955)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1138)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1120)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1929)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1238)
at android.app.Activity.performStart(Activity.java:6349)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2395)
... 9 more

你可能感兴趣的:(Unable to start activity ComponentInfo,请教如何解决?)