Archive for June, 2015

作者:AngryFox 分类: Uncategorized June 19th, 2015 暂无评论

异常1:

6-19 14:31:38.687: E/ActivityThread(1179): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@424979d0 that was originally bound here
06-19 14:31:38.687: E/ActivityThread(1179): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@424979d0 that was originally bound here
06-19 14:31:38.687: E/ActivityThread(1179): 	at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1011)
06-19 14:31:38.687: E/ActivityThread(1179): 	at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:905)
06-19 14:31:38.687: E/ActivityThread(1179): 	at android.app.ContextImpl.bindService(ContextImpl.java:1590)
06-19 14:31:38.687: E/ActivityThread(1179): 	at android.app.ContextImpl.bindService(ContextImpl.java:1579)
06-19 14:31:38.687: E/ActivityThread(1179): 	at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-19 14:31:38.687: E/ActivityThread(1179): 	at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:162)
06-19 14:31:38.687: E/ActivityThread(1179): 	at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:147)
06-19 14:31:38.687: E/ActivityThread(1179): 	at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:207)
06-19 14:31:38.687: E/ActivityThread(1179): 	at com.android.exchange.ExchangeService$7.run(ExchangeService.java:2160)
06-19 14:31:38.687: E/ActivityThread(1179): 	at com.android.emailcommon.utility.Utility$3.doInBackground(Utility.java:616)
06-19 14:31:38.687: E/ActivityThread(1179): 	at com.android.emailcommon.utility.Utility$3.doInBackground(Utility.java:614)
06-19 14:31:38.687: E/ActivityThread(1179): 	at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-19 14:31:38.687: E/ActivityThread(1179): 	at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-19 14:31:38.687: E/ActivityThread(1179): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-19 14:31:38.687: E/ActivityThread(1179): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-19 14:31:38.687: E/ActivityThread(1179): 	at java.lang.Thread.run(Thread.java:838)

异常2:

06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): invalid value for field
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): java.lang.IllegalArgumentException: invalid value for field
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at java.lang.reflect.Field.setField(Native Method)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at java.lang.reflect.Field.set(Field.java:588)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at com.lidroid.xutils.ViewUtils.injectObject(ViewUtils.java:98)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at com.lidroid.xutils.ViewUtils.inject(ViewUtils.java:49)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at com.uya.uya.activity.LoginActivity.onCreate(LoginActivity.java:63)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at android.app.Activity.performCreate(Activity.java:5008)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at android.app.ActivityThread.access$600(ActivityThread.java:133)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at android.os.Handler.dispatchMessage(Handler.java:99)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at android.os.Looper.loop(Looper.java:137)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at android.app.ActivityThread.main(ActivityThread.java:4794)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at java.lang.reflect.Method.invokeNative(Native Method)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at java.lang.reflect.Method.invoke(Method.java:511)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
06-19 13:54:01.332: E/ViewUtils.injectObject(L:101)(1225): 	at dalvik.system.NativeStart.main(Native Method) 

@viewInject中的全部重写了一遍,是控件转换有问题

作者:AngryFox 分类: Uncategorized June 13th, 2015 暂无评论

方法一(删掉Work Space下的.metadata\.plugins\org.eclipse.core.resources\.projects):
关闭Eclipse,删掉Eclipse WorkSpace下.metadata\.plugins\org.eclipse.core.resources\.projects文件夹下的所有内容,再重启Eclipse。
如果项目不见了,import重新导入项目
END

方法二(关闭后,拔网线再重启):
如果用最省事的方法一不能解决问题时,拔掉网线后再重启Eclipse看看。有时候也能够得到解决。

方法三(删掉.android):
关闭Eclipse,删掉C:\Users\用户名\.android文件夹下的所有内容,再重启Eclipse。

方法四(关闭后重启):
遇到Eclipse右下角一直显示“Android sdk content loader 0%”的情况时,直接关掉Eclipse,有ADB进程在运行时通过进程管理器结束进程,然后重启Eclipse。通过这种方法多数情况下问题会得到解决。

作者:AngryFox 分类: Uncategorized June 8th, 2015 暂无评论

PhotoShop打开提示“AMT Subsystem Failure”解决方法

win8下:
右键 我的电脑 管理 服务和应用程序 服务 。
ps:结果测试,只启动“FLEXnet Licensing Service”一个服务即可恢复正常使用,也不必重新启动机器。

作者:AngryFox 分类: Uncategorized June 8th, 2015 暂无评论

imageView.setScaleType(ImageView.ScaleType.FIT_XY );

理解ImageView的属性android:scaleType,即ImageView.setScaleType(ImageView.ScaleType)。android:scaleType是控制图片如何resized/moved来匹对ImageView的size。ImageView.ScaleType / android:scaleType值的意义区别:
CENTER /center 按图片的原来size居中显示,当图片长/宽超过View的长/宽,则截取图片的居中部分显示
CENTER_CROP / centerCrop 按比例扩大图片的size居中显示,使得图片长(宽)等于或大于View的长(宽)
CENTER_INSIDE / centerInside 将图片的内容完整居中显示,通过按比例缩小或原来的size使得图片长/宽等于或小于View的长/宽
FIT_CENTER / fitCenter 把图片按比例扩大/缩小到View的宽度,居中显示
FIT_END / fitEnd 把图片按比例扩大/缩小到View的宽度,显示在View的下部分位置
FIT_START / fitStart 把图片按比例扩大/缩小到View的宽度,显示在View的上部分位置
FIT_XY / fitXY 把图片不按比例扩大/缩小到View的大小显示
MATRIX / matrix 用矩阵来绘制
MATRIX矩阵可以动态缩小放大图片来显示,这里不展开深入的了解,只是贴出相关语句,缩小图片:

 1 //获得Bitmap的高和宽
 2 int bmpWidth=bmp.getWidth();
 3 int bmpHeight=bmp.getHeight();
 4
 5 //设置缩小比例
 6 double scale=0.8;
 7 //计算出这次要缩小的比例
 8 scaleWidth=(float)(scaleWidth*scale);
 9 scaleHeight=(float)(scaleHeight*scale);
10
11 //产生resize后的Bitmap对象
12 Matrix matrix=new Matrix();
13 matrix.postScale(scaleWidth, scaleHeight);
14 Bitmap resizeBmp=Bitmap.createBitmap(bmp, 0, 0, bmpWidth, bmpHeight, matrix, true); 

1 <ImageView
2 android:id="@+id/image"
3     android:layout_width="fill_parent"
4     android:layout_height="fill_parent"
5     android:scaleType="center"
6     android:src="@drawable/candle"
7 />