java.lang.RuntimeException

來源:酷知科普網 1.03W

05-21 10:03:03.916: E/AndroidRuntime(18573): FATAL EXCEPTION: main
05-21 10:03:03.916: E/AndroidRuntime(18573): imeException: Unable to instantiate activity ComponentInfo{com.example.tomato/com.example.alarmtest.AppStart}: sNotFoundException: com.example.alarmtest.AppStart
05-21 10:03:03.916: E/AndroidRuntime(18573): at ormLaunchActivity()
05-21 10:03:03.916: E/AndroidRuntime(18573): at leLaunchActivity()
05-21 10:03:03.916: E/AndroidRuntime(18573): at ss$600()
05-21 10:03:03.916: E/AndroidRuntime(18573): at vityThread$leMessage()
05-21 10:03:03.916: E/AndroidRuntime(18573): at atchMessage()
05-21 10:03:03.916: E/AndroidRuntime(18573): at ()
05-21 10:03:03.916: E/AndroidRuntime(18573): at ()
05-21 10:03:03.916: E/AndroidRuntime(18573): at keNative(Native Method)
05-21 10:03:03.916: E/AndroidRuntime(18573): at ke()
05-21 10:03:03.916: E/AndroidRuntime(18573): at teInit$()
05-21 10:03:03.916: E/AndroidRuntime(18573): at ()
05-21 10:03:03.916: E/AndroidRuntime(18573): at (Native Method)
05-21 10:03:03.916: E/AndroidRuntime(18573): Caused by: sNotFoundException: com.example.alarmtest.AppStart
05-21 10:03:03.916: E/AndroidRuntime(18573): at Class()
05-21 10:03:03.916: E/AndroidRuntime(18573): at Class()
05-21 10:03:03.916: E/AndroidRuntime(18573): at Class()
05-21 10:03:03.916: E/AndroidRuntime(18573): at ctivity()
05-21 10:03:03.916: E/AndroidRuntime(18573): at ormLaunchActivity()

imeException

操作方法

(01)一般出現這個問題主要是沒有在專案的裡註冊使用activity,主要就是這句: imeException: Unable to instantiate activity ComponentInfo{com.example.tomato/com.example.alarmtest.AppStart}: sNotFoundException: com.example.alarmtest.AppStart

(02)上面它已經就說,你沒有例項化com.example.tomato/com.example.alarmtest.AppStart,tomato是專案名字,AppStart是沒有例項化的activity。這就明白了,檢查這下,註冊<activity android:name="com.example.tomato.AppStart"/>。

(03)但有時你發覺你已經註冊,這時你要仔細檢查,看看是不是包名寫錯了,仔細排查錯誤。就能解決了。

熱門標籤