<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[wanhjun的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/wanhjun</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; wanhjun]]></copyright><item><title><![CDATA[Error:Execution failed for task ':app:processDebugResources'....finished with non-zero exit value 1]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/51037970</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/51037970</guid><author>wanhjun</author><pubDate>Fri, 01 Apr 2016 16:37:20 +0800</pubDate><description><![CDATA[运行android studio包以下错误信息，特别纳闷，还没改几句代码，怎么就报错了？唉，不早了，9点半了，还是回去吧，明天再搞。
      Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.p]]></description><category></category></item><item><title><![CDATA[android studio运行安装后，手机上出现两个相同的App图标]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/50996696</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/50996696</guid><author>wanhjun</author><pubDate>Mon, 28 Mar 2016 11:41:40 +0800</pubDate><description><![CDATA[问题：打包了一个aar包，并在项目中引用了这个aar包，运行后，在手机上出现了两个相同的App图标。
        解决：打包aar时，把AndroidManifest.xml 文件中，以下内容都去掉。]]></description><category></category></item><item><title><![CDATA[根据mac地址进行BLE连接]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/50865227</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/50865227</guid><author>wanhjun</author><pubDate>Sat, 12 Mar 2016 13:58:16 +0800</pubDate><description><![CDATA[public class BleService{
    private final String TAG="BleService";
    private BluetoothManager mBluetoothManager;
    private BluetoothAdapter mBluetoothAdapter;
    private String mBtMac;
    ]]></description><category></category></item><item><title><![CDATA[android手机锁屏后GPS模块发出的NMEA数据频率降低]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/50739024</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/50739024</guid><author>wanhjun</author><pubDate>Thu, 25 Feb 2016 16:58:48 +0800</pubDate><description><![CDATA[做了一个接收手机GPS模块发出的NMEA数据，然后解析数据，将数据发送给其他App的App。但是发现当android手机睡眠之后（即黑屏状态），发出的NMEA频率大大降低了，大概40秒才会发出一次数据。
        解决的方法是，打开App时，拿到睡眠锁，App退出时，释放睡眠锁。代码如下：
public class WakeLockManager {
    public final]]></description><category></category></item><item><title><![CDATA[不停的往android手机串口写数据]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/50738812</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/50738812</guid><author>wanhjun</author><pubDate>Thu, 25 Feb 2016 16:36:24 +0800</pubDate><description><![CDATA[首先不停的从服务器读数据，我初始化了一个4096的byte数组存放数据：
    byte[] bufferBytes = new byte[4096];
    int len = mIn.read(bufferBytes);
然后又将数据打包成四份，逐个写入到手机串口里面，经常就会出现卡顿的现象。
这个问题折腾了好久，代码是检查一边又一边，就是找不到问题，后来将读取到的数据（即buff]]></description><category></category></item><item><title><![CDATA[android发送邮件（包括附件）]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/50705434</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/50705434</guid><author>wanhjun</author><pubDate>Sat, 20 Feb 2016 17:24:08 +0800</pubDate><description><![CDATA[android发送邮件初期遇到的问题：
    1.发送到QQ邮箱成为垃圾邮件
    2.发送到有些邮箱，没有正文
    经过几次试验，终于能够正常发送邮件了。
    以下是代码：
 
public class 
MailSender { 
/** * send mail 
* @param mailInfo Info 
*/ 
public boolean
send]]></description><category></category></item><item><title><![CDATA[一个频繁刷新内容的textview]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/50697621</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/50697621</guid><author>wanhjun</author><pubDate>Fri, 19 Feb 2016 14:10:46 +0800</pubDate><description><![CDATA[一个频繁刷新内容的textview，字符再多就会卡顿。
 
public class ConsoleView extends ScrollView {
    public static final String START_SUFF = "";
    private static final int MAX_CHARACTERS = 4096;
    private static]]></description><category></category></item><item><title><![CDATA[子线程也是需要休息的]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/50696741</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/50696741</guid><author>wanhjun</author><pubDate>Fri, 19 Feb 2016 11:24:10 +0800</pubDate><description><![CDATA[在使用子线程时，如果这个子线程是要长时间一直工作，需要工作几次后就休眠50-100毫秒，否则会占很高的CPU。]]></description><category></category></item><item><title><![CDATA[关于Android旋转屏幕丢失数据的新读]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/50696571</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/50696571</guid><author>wanhjun</author><pubDate>Fri, 19 Feb 2016 11:08:11 +0800</pubDate><description><![CDATA[根据之前的经验，一直以为当Android屏幕旋转的时候会重新调用onCreate()，从而导致界面上所有的数据都会被重置，需要在Manifest中对Activity设置一个属性才能让他不重新走onCreate方法。或者很麻烦的需要在 onSaveInstanceState()方法中保存界面所有数据，然后在onRestoreInstanceState()方法中还原数据才行。
    直到今天看到这]]></description><category></category></item><item><title><![CDATA[进程间传递数据]]></title><link>https://blog.youkuaiyun.com/wanhjun/article/details/50696521</link><guid>https://blog.youkuaiyun.com/wanhjun/article/details/50696521</guid><author>wanhjun</author><pubDate>Fri, 19 Feb 2016 11:06:20 +0800</pubDate><description><![CDATA[Android提供的进程间传递数据的接口，就是传递的数据类型一定是要实现Parcelable接口的，我们定义了一个GnssInfo对象，准备在进程间传递这个对象，也将GnssInfo继承了Parcelable接口，在测试进程间传递数据的时候，结果发生了奔溃，在网上搜索报出的异常，以为是线程不同步的问题，为了这个问题，折腾了好久，后来才猜测是进程间传递数据的问题，经过测试，发现是因为Gnss...]]></description><category></category></item></channel></rss>