用阿拉伯数字注册用户时是可以成功的,但是使用字母注册的时候问题就出现了。只要是以字母为用户名,在点击注册的时候程序就崩溃了。查看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.
捣鼓了好久 在表哥的指点下才发现是这里没有加引号导致程序不能识别注册时输入的是什么。
本文探讨了在使用字母作为用户名进行注册时遇到的问题,即应用程序崩溃并出现数据库连接泄漏的错误提示。通过检查发现未对字母字段正确引用是导致问题的原因。
880

被折叠的 条评论
为什么被折叠?



