android中易错点
16lz
2021-01-26
1.字符串匹配:
equals和==是有区别的
用jsoup的select获得text,比如"我、你",好像和字符串的"我、你",用equals不能相等,我也不知道为什么,只有把字符串里面的符号去掉才行。
2,执行sqlite数据库操作:
"create table"+ TBL_NAME
+"(classname varchar(40),time integer , week integer)"
在引号外面的空格都不算空格。加入TBL_NAME是xx的话那么这句话就是:create tablexx
所有要在table后面引号前面加空格"create table "+ TBL_NAME
3.Failure 21 (out of memory) on 0x0 when preparing 'PRAGMA user_version = 1'.
这个错误时看一篇英文文章解决的: http://stackoverflow.com/questions/5208606/cannot-create-android-sqlite-database-pragma-error 因为android在db.execSQL(CREATE_TBL);之后,系统自动close了数据库,所以不要手动关闭。更多相关文章
- Android客户端与服务器端通过DES加密认证
- string.xml中占位符的使用
- Android(安卓)strings.xml文件定义字符串中的标签
- Android(安卓)获得Url、Uri字符串后面拼接的参数
- Andrid中的plurals
- Android资源之String (一): 特殊字符
- android TextView 分散对齐(两端对齐)
- http通信,Android(安卓)Gzip压缩解压
- InputFilter方法filter 解释