- 博客(5)
- 收藏
- 关注
原创 新导入Jar包时遇到NoClassDefFoundError 的解决方法
软件之前运行得很好,为了使用某个控件,重新下载并导入了一个jar包(之前就有该Jar包), 编译的时候没问题,但一到手机上运行就报错,出现NoClassDefFoundError,很郁闷,在网上找了好多方法都不行,后来发现其实很简单:Properties——Java Build Path——勾选该导入的jar包——clean——Debug就OK了~~~~
2017-07-25 15:13:54
5497
1
原创 发送广播Broadcast
1. 发送:Intent intent=new Intent();intent.putExtra("str", str);intent.setAction("。。。");sendBroadcast(intent);2.接收:a.注册广播接收器receiver=new MyReceiver();IntentFilter filter=new IntentFi
2017-07-20 16:31:48
290
原创 获取安卓系统时间
第一种:final Calendar c=Calendar.getInstance();year=c.get(Calendar.YEAR);month=c.get(Calendar.MONTH)+1;day=c.get(Calendar.DAY_OF_MONTH);hour=c.get(Calendar.HOUR_OF_DAY);min=c.get(Calendar.M
2017-07-20 16:20:25
274
原创 Service中使用Toast,及遇到的问题
在Service中开启蓝牙连接,连接成功后Toast,提示连接状态,方法如下:public class BluetoothService extends Service {@Overridepublic IBinder onBind(Intent intent){return null;}@Overridepublic void onCreate(){han
2017-07-18 20:27:43
680
转载 三种字符数组合并的方法
public static String[] getOneArray() { String[] a = { "0", "1", "2" }; String[] b = { "0", "1", "2" }; String[] c = new String[a.length + b.length]; for (int j = 0; j c[j] =
2017-07-12 21:03:54
1340
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人