我使用相同的代碼從這個鏈接Google chatXMPPConnection錯誤的Android
但我得到下面的錯誤。
04-12 09:13:55.903: ERROR/AndroidRuntime(362): FATAL EXCEPTION: Thread-8
04-12 09:13:55.903: ERROR/AndroidRuntime(362): java.lang.ExceptionInInitializerError
04-12 09:13:55.903: ERROR/AndroidRuntime(362): at org.jivesoftware.smack.ConnectionConfiguration.<init>(ConnectionConfiguration.java:99)
04-12 09:13:55.903: ERROR/AndroidRuntime(362): at org.jivesoftware.smack.XMPPConnection.<init>(XMPPConnection.java:131)
04-12 09:13:55.903: ERROR/AndroidRuntime(362): at com.ex.HelloFormStuffActivity.HelloFormStuffActivity$1.run(HelloFormStuffActivity.java:38)
04-12 09:13:55.903: ERROR/AndroidRuntime(362): at java.lang.Thread.run(Thread.java:1096)
04-12 09:13:55.903: ERROR/AndroidRuntime(362): Caused by: java.lang.NoClassDefFoundError: javax.naming.directory.InitialDirContext
04-12 09:13:55.903: ERROR/AndroidRuntime(362): at org.jivesoftware.smack.util.DNSUtil.<clinit>(DNSUtil.java:50)
04-12 09:13:55.903: ERROR/AndroidRuntime(362): ... 4 more
我不知道爲什麼會出現這個錯誤。 任何人都可以幫助我嗎?
我有同樣的問題,但現在它解決了,謝謝 – juned 2012-07-03 10:07:31