1. 程式人生 > >Unable to start activity ComponentInfo,請教如何解決?

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請教如何解決

異常型別:java.lang.RuntimeException 異常資訊:Unable to start activity ComponentInfo{com.example.seh/com.example.seh.TopicActivity}: java.lang.N

整合百度地圖出現Unable to start activity ComponentInfo 解決方法

我傻了 搞了半天發現初始化出現問題 SDKInitializer.initialize(getApplicationContext());這句話忘寫了 注意 如果在Activity裡面初始化  這句話要寫在setContentVIew之前

Android開發中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}

net 控件 view etc spi pos rst ack data Android開發中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullP

記錄錯誤:java.lang.RuntimeException: Unable to start activity ComponentInfo

android  activity打不開,具體錯誤如下: 01-02 00:02:25.495 E/AndroidRuntime(  984): FATAL EXCEPTION: main01-02 00:02:25.495 E/AndroidRuntime(  98

第一行程式碼新聞例子報錯 Unable to start activity ComponentInfo 原因

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.timemanager.jason.fragmentbestpractice, PID: 5621 java.lang.RuntimeException: Unable to start activity

Android開發中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPoi

今天學習Android開發突然遇到了這個問題,查閱了很多資料,並且對集中原因進行了分析。  錯誤資訊字串:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.first/com.f

java.lang.RuntimeException: Unable to start activity ComponentInfo{...}: java.lang.NullPointerExcept

錯誤提示: java.lang.RuntimeException: Unable to start activity ComponentInfo{...}: java.lang.NullPointerException 網上有不少解決辦法 一般都會在Activity onC

關於Unable to start activity ComponentInfo異常

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.demo4/com.example.demo4.SubActivity}: java.lang.NullPointe

Unable to start activity ComponentInfo{com.example.test/com.example.test.DividiDemoActivity

莫名其妙報了一個如題的錯誤: 出現的情況有以下幾種: A、 xml中定義有錯誤,如 android:id=”@+id/btn_first”或許定義的時候寫錯了 B、findViewById查

android異常Unable to instantiate activity ComponentInfo解決方法

本人最近除錯一個除錯一個程式,jar包都新增好了,程式沒有任何錯誤資訊,但是執行到手機,卻打印出這樣的錯誤資訊: 08-29 20:07:52.584: E/AndroidRuntime(4517): java.lang.RuntimeException:

【學習Android遇到的錯誤】關於Unable to instantiate activity ComponentInfo錯誤解決方案

 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android/activity.MainTabActivity}:  java.lang.ClassNotFou

關於Unable to instantiate activity ComponentInfo錯誤解決方案

今天除錯程式的時候報了  java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android/activity.MainTabActivity}:  java.lang.ClassNotFoundExce

Android Studio Unable to instantiate activity ComponentInfo

轉自 https://blog.csdn.net/chjqxxxx/article/details/78180815 因為Google宣佈不對eclipse支援了,所以小弟也想從eclipse慢慢轉到android studio! 在一次將專案遷移到android studio的時候 遇

Tomcat啟動報unable to start within 45 seconds錯誤解決辦法

1.錯誤描述 Server Tomcat v8.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in

關於Server Tomcat v8.5 Server at localhost was unable to start within 45 second的解決辦法

這個問題可能大家都有碰到過,有的人可能是到這個問題,就重新啟動一次eclipse就好了,但如果是大型的專案,重新啟動也還是會報這個錯。 出現這個情況的原因有兩個,一是你的資料庫連線connection超時,二是你的專案真的在45s之間還沒啟動起來,是由於專案比較

初學者級java.lang.RuntimeException: Unable to instantiate activity ComponentInfo

不多說,看到初學者級就知道,這鬼異常爆出來肯定是沒好好看書導致的。 又花了大半天時間解決了一個奇奇怪怪的問題。 過程就不說了,都是淚。 http://blog.csdn.net/gaohongijj/article/details/8010869/ 這位大神細緻的講解了很多

Unable to resolve target 'android-8'INSTALL_FAILED_UPDATE_INCOMPATIBLE和failed to start daemon等問題的解決

問題1:Unable to resolve target 'android-8' 首先說說這個問題的來源,當匯入一個以前用其他低平臺開發的包時,發現瞭如下的問題: 如下,我們先新建一個工程,進入以下

VirtualBox 在WIN7 X64 安裝報錯 獲取VirtualBox COM對象失敗Unable to start the virtual device

device class mode gis col model gist try .cn Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\CLSID\{00020420-0000-0000-C000-000

解決springboot啟動失敗問題:Unable to start embedded container;

應該 create exception illegal cep listener cli use log 全部報錯內容如下: org.springframework.context.ApplicationContextException: Unable to start e

解決Tomcat v6.0 Server at localhost was unable to start within 45 seconds

editor cat 超時 seconds 出現 cfb tin sin java eclipse 中tomcat啟動超時報錯如下: Starting Tomcat v7.0 Server at localhost‘ has encountered a problem Se