原创 android.view.WindowManager$BadTokenExcept

  DESCRIPTION: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@424c

原创 Unable to launch com.* for service Intent { cmp=com.*/.* }: process is bad

 最近的項目需要用到服務端收集客戶端崩潰的詳細異常log數據:   之前也做過,感覺很輕鬆,沒想到遇到問題了,還糾結了半天:  以下是關鍵log日誌 05-04 20:28:42.409: W/ActivityManager(374):

原创 eclipse android 設置及修改生成apk的簽名文件

android eclipse 設置及修改生成apk的簽名文件 1、 問題: 平時在使用eclipse進行android project開發時,由於每個項目組都有自身的簽名, 但默認Eclipse ADT調試運行使用的是臨時生成的Deb

原创 SVN版本問題:This client is too old to work with working copy

1、svn 遇到的問題 出現問題之前: a、構建服務器上原本的 SubVersion svn(Version Control with Subversion [),版本號:1.7.0(只支持命令行)。 b、爲了使用便利,安裝一個可視化s

原创 點觸TextView的時候不能滑動ViewPager

ViewPager + TextView + singleLine = true + gravity = center\center_horizontal  == bug ViewPager 中的TextView 會消耗Event事件(當

原创 android Service onStartCommand intent爲null

  03-02 17:15:44.770 536 778 W ActivityManager: Scheduling restart of crashed service ****/.service.WatchDogServic

原创 Aidl Parcelable in out inout 作用

在使用aidl傳輸數據時,對於非基本數據類型,也不是String和CharSequence類型的,(即Parcelable類型)需要有方向指示,包括in、out和inout。 下表爲in,out在遠程傳輸的作用   Stub.ontra

原创 開發者,安卓手機連不上PC原因之一

開發人員,偶爾會遇上安卓手機連不上PC的情況,這裏分析其中一種情況以及解決方法。 常見的問題,使用4.2之後的安卓手機連接pc,用過市面上各種連接工具都無效。 手機一直不彈出一下提示框: 這個時候如果使用低於4.2的安卓手機可能可以連上

原创 android手機內存和SD卡內存

  //手機內存 == /data File path = Environment.getDataDirectory(); StatFs stat = new StatFs(path.getPath()); long blockSize

原创 獲取Application debuggable

  boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE));  

原创 使用handler的過程,可能帶來的內存泄露

轉發: http://my.eoe.cn/yaming/archive/5133.html   解決方式: 聲明 handler 爲 static 內部類,並且 對context 採取 弱引用 WeakReference 方式

原创 RemoteView 異常

01-03 13:20:36.687: E/AndroidRuntime(8513): FATAL EXCEPTION: main 01-03 13:20:36.687: E/AndroidRuntime(8513): android.

原创 android:descendantFocusability

  開發中很常見的一個問題,項目中的listview不僅僅是簡單的文字,常常需要自己定義listview,自己的Adapter去繼承BaseAdapter,在adapter中按照需求進行編寫,問題就出現了,可能會發生點擊每一個item的

原创 獲取 TextView 的長度

Paint paint = new Paint(); paint.setTextSize(currentTextView.getTextSize()); float size = paint.measureText(cu

原创 android批量插入數據效率對比

對比在android中批量插入數據的3中方式對比(各插入1W條數據所花費的時間): 1、 一個一個插入   /** * 向表中插入數據 * * @param openHelper * @param appInfo