出錯
Activity com.skyace.service.MainActivity has leaked ServiceConnection com.phicomm.hu.MainActivity that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.skyace.service.MainActivity has leaked ServiceConnection com.skyace.service.MainActivity$1@41cd81f0 that was originally bound here
後來在之後加上了重寫的onDestroy的回調方法中加入了對服務的解綁操作即 unbindService就成功解決了,如下:
@Override protected void onDestroy() { // TODO 自动生成的方法存根 super.onDestroy(); unbindService(conn); }
出錯
11-06 06:55:47.913: E/AndroidRuntime(1604): FATAL EXCEPTION: Thread-115
11-06 06:55:47.913:E/AndroidRuntime(1604):java.lang.NoClassDefFoundError:org.xbill.DNS.ResolverConfig
11-06 06:55:47.913: E/AndroidRuntime(1604): at org.jivesoftware.smack.SmackAndroid$1$1.run(SmackAndroid.java:41)
(Make sure to read the README or it wont work!)
Smack requires dnsjava for DNS SRV record lookup. You need to add the
dnsjava library to your project's libraries.
少了asmack 依賴檔 dnsjava 加入library即可
wifi 斷線後tick 執行緒無法正常重新運作
解法
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
沒有留言:
張貼留言