2014-01-13 30 views
4

我正在用Smack構建一個應用程序。在Eclipse模擬器中運行應用程序後,apk獲得成功安裝,但似乎沒有響應。點擊它後,我得到 警報「不幸的是,該應用程序停止工作」。請幫我解決這個問題。 logcat的:Android錯誤Dx編寫輸出的麻煩:已經準備好了

01-13 05:55:17.117: E/AndroidRuntime(1067): FATAL EXCEPTION: main 
01-13 05:55:17.117: E/AndroidRuntime(1067): Process: com.demo.xmppchat, PID: 1067 
01-13 05:55:17.117: E/AndroidRuntime(1067): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.demo.xmppchat/com.demo.xmppchat.CustomizedListView}: java.lang.NullPointerException 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.app.ActivityThread.access$700(ActivityThread.java:135) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.os.Handler.dispatchMessage(Handler.java:102) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.os.Looper.loop(Looper.java:137) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.app.ActivityThread.main(ActivityThread.java:4998) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at java.lang.reflect.Method.invokeNative(Native Method) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at java.lang.reflect.Method.invoke(Method.java:515) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at dalvik.system.NativeStart.main(Native Method) 
01-13 05:55:17.117: E/AndroidRuntime(1067): Caused by: java.lang.NullPointerException 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at com.demo.xmppchat.CustomizedListView.onCreate(CustomizedListView.java:80) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.app.Activity.performCreate(Activity.java:5243) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140) 
01-13 05:55:17.117: E/AndroidRuntime(1067):  ... 11 more 
+1

LogCat .....。?? –

+1

LogCat .. ??嘗試清理您的項目並運行它 – rajahsekar

+0

我試圖清理這麼多次。但仍然輸出相同 – meera

回答

13

項目的開放屬性 - > Java構建路徑 - >取消 「Android的私家藏書」 和 「Android的依賴」。

+0

你救了我的一天:)這必須是一個被接受的答案! – MohanRaj

+0

greate !!!!!!!!!!!! – user1992