初学Android,在注册页面遇到的一个bug

来源:互联网 发布:文献法包括网络 编辑:程序博客网 时间:2024/05/17 08:04

        用阿拉伯数字注册用户时是可以成功的,但是使用字母注册的时候问题就出现了。只要是以字母为用户名,在点击注册的时候程序就崩溃了。查看logcat,说是在插入数据库表的时候没有找到该字段,并且报了以下错误:

database '/data/user/0/com.google.android.gms/databases/metrics.db.16' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.

08-04 01:28:04.349 2740-2747/com.google.android.gms W/SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/com.google.android.gms/databases/help_responses.db.18' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.

08-04 01:28:04.350 2740-2747/com.google.android.gms W/SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/com.google.android.gms/databases/auto_complete_suggestions.db' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed. 

捣鼓了好久 在表哥的指点下才发现是这里没有加引号导致程序不能识别注册时输入的是什么。

原创粉丝点击