无知者无畏
hold_on · 共 46 篇文章
eclipse android 设置及修改生成apk的签名文件
android eclipse 设置及修改生成apk的签名文件 1、 问题: 平时在使用eclipse进行android project开发时,由于每个项目组都有自身的签名, 但默认Eclipse ADT调试运行使用的是临时生成的Debug专用证书,默认为C:\Users\XXX\.android\debug.keystore。 于是每次调试程序必须使用ADT的Export Signed Application Package打带正式签名的包,或者另写重新签名脚本,比较麻烦。 后来发现ADT允许自定义调试用证书,在Window->Preferences->Android->Build->Cu…
2014-05-10 15:23 · Android · 评论(0)
SVN版本问题:This client is too old to work with working copy
1、svn 遇到的问题 出现问题之前: a、构建服务器上原本的 SubVersion svn(Version Control with Subversion [),版本号:1.7.0(只支持命令行)。 b、为了使用便利,安装一个可视化svn client: TortoiseSVN , 版本号:1.8 TortoiseSVN A Subversion client for Windows Version 1.8 出现问题: 这两天自动构建提交项目时候,虚拟机用SVN提交的时候,总是报如下提示: svn: This client is too old to work with working c…
2014-05-09 17:27 · Android · 评论(0)
Unable to launch com.* for service Intent { cmp=com.*/.* }: process is bad
最近的项目需要用到服务端收集客户端崩溃的详细异常log数据: 之前也做过,感觉很轻松,没想到遇到问题了,还纠结了半天: 以下是关键log日志 05-04 20:28:42.409: W/ActivityManager(374): Process com.example.service has crashed too many times: killing! 05-04 20:28:42.409: I/ActivityManager(374): Killing proc 20556:com.example.service/u0a10080: crash 05-04 20:28:43.323: …
2014-05-04 21:20 · android Exception · 评论(1)
开发者,安卓手机连不上PC原因之一
开发人员,偶尔会遇上安卓手机连不上PC的情况,这里分析其中一种情况以及解决方法。 常见的问题,使用4.2之后的安卓手机连接pc,用过市面上各种连接工具都无效。 手机一直不弹出一下提示框: 这个时候如果使用低于4.2的安卓手机可能可以连上PC; 这起决于你PC上装的 android sdk 的platform-tools的版本, 以上弹框是4.2之后加入的,所以假如不幸没有更新sdk到4.2之后, 那么4.2及4.2以上的安卓手机都连不上PC。 解决办法: 1、 更新sdk 2、 将别人电脑上(能正常连接PC)sdk中platform-tools目录下的 这三个文件拷贝到你的 sdk 中的 p…
2014-04-11 18:50 · Android · 评论(0)
获取Application debuggable
boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE));
2014-03-06 17:28 · Android · 评论(0)
android批量插入数据效率对比
对比在android中批量插入数据的3中方式对比(各插入1W条数据所花费的时间): 1、 一个一个插入 /** * 向表中插入数据 * * @param openHelper * @param appInfo * @return */ public static boolean insert(SQLiteOpenHelper openHelper, RemoteAppInfo appInfo) { if (null == appInfo) { return true; } SQLiteDatabase db = null; try { db = openHelper.getWritableD…
2014-03-06 16:58 · Android · 评论(0)
Aidl Parcelable in out inout 作用
在使用aidl传输数据时,对于非基本数据类型,也不是String和CharSequence类型的,(即Parcelable类型)需要有方向指示,包括in、out和inout。 下表为in,out在远程传输的作用 Stub.ontransact() Proxy.callback(Data data) in 接收远程传输的数据(Data) 输入本地数据(Data) 中间过程 本地调用(修改Data) 远程调用(给远程传输Data) out 将经过本地调用修改过后的Data,返回给远端 获取远程调用之后,传输过来的远端数据(Data) 测试数据: a、server in client in 03-…
2014-03-05 15:27 · Android · 评论(0)
android Service onStartCommand intent为null
03-02 17:15:44.770 536 778 W ActivityManager: Scheduling restart of crashed service ****/.service.WatchDogService in 5000ms 03-02 17:15:44.770 536 778 W ActivityManager: Scheduling restart of crashed service ****/.service.APPTestService in 15000ms 03-02 17:15:44.770 536 778 W ActivityManager: Sched…
2014-03-03 14:53 · android Exception · 评论(0)
使用handler的过程,可能带来的内存泄露
转发: http://my.eoe.cn/yaming/archive/5133.html 解决方式: 声明 handler 为 static 内部类,并且 对context 采取 弱引用 WeakReference 方式
2013-12-06 11:13 · Android · 评论(0)
获取 TextView 的长度
Paint paint = new Paint(); paint.setTextSize(currentTextView.getTextSize()); float size = paint.measureText(currentTextView.getText().toString());
2013-11-26 11:04 · Android · 评论(0)
RemoteView 异常
01-03 13:20:36.687: E/AndroidRuntime(8513): FATAL EXCEPTION: main 01-03 13:20:36.687: E/AndroidRuntime(8513): android.app.RemoteServiceException: Bad notification posted from package com.zl: Couldn't expand RemoteViews for: StatusBarNotification(package=com.zl id=224968 tag=null notification=Notifi…
2013-11-15 15:34 · android Exception · 评论(0)
点触TextView的时候不能滑动ViewPager
ViewPager + TextView + singleLine = true + gravity = center\center_horizontal == bug ViewPager 中的TextView 会消耗Event事件(当成onClick事件),导致点触TextView的时候不能滑动ViewPager
2013-11-04 09:50 · Android · android Exception · 评论(1)
android手机内存和SD卡内存
//手机内存 == /data File path = Environment.getDataDirectory(); StatFs stat = new StatFs(path.getPath()); long blockSize = stat.getBlockSize(); long availableBlocks = stat.getAvailableBlocks(); long totalBlocks = stat.getBlockCount(); //SD卡存储 == /mnt/sdcard/ File path = Environment.getExternalStorageDi…
2013-10-24 16:52 · 评论(0)
android:descendantFocusability
开发中很常见的一个问题,项目中的listview不仅仅是简单的文字,常常需要自己定义listview,自己的Adapter去继承BaseAdapter,在adapter中按照需求进行编写,问题就出现了,可能会发生点击每一个item的时候没有反应,无法获取的焦点。原因多半是由于在你自己定义的Item中存在诸如ImageButton,Button,CheckBox等子控件(也可以说是Button或者Checkable的子类控件),此时这些子控件会将焦点获取到,所以常常当点击item时变化的是子控件,item本身的点击没有响应。 这时候就可以使用descendantFocusability来解决啦…
2013-10-17 15:30 · Android · 评论(0)