应用程序工作正常,在模拟器而不是移动设备上 [英] App works fine on Emulator but not on Mobile device

查看:132
本文介绍了应用程序工作正常,在模拟器而不是移动设备上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序从pressing不同的EditText盒保存价值保存按钮SQLite数据库。这个应用程序工作正常的模拟器,并提供所需的输出。但是,应用程序显示强制关闭关于pressing错误在移动设备保存按钮。

我在SQLite数据库$ P $工作pviously和我pretty确定在该部分没有错误。那么是什么问题。请帮忙。

下面是LogCat中的条目,如果帮助: -

 十二月8日至3日:08:28.875:I / ActivityManager(59):启动活动:意向{CMP = com.SMSDb / .Settings}
12月8日至3日:08:29.665:I / ActivityManager(59):显示活动com.SMSDb / .Settings:744毫秒(总744毫秒)
12月8日至3日:08:47.126:D / dalvikvm(10469):GC_FOR_MALLOC释放6935对象/在108ms 332488字节
12月8日至3日:08:47.155:I / ActivityManager(59):启动活动:意向{CMP = com.SMSDb / .SMSDbActivity}
12月8日至3日:08:47.765:I / ActivityManager(59):显示活动com.SMSDb / .SMSDbActivity:498毫秒(总498毫秒)
12月8日至3日:08:57.765:I / ActivityManager(59):启动活动:意向{CMP = com.SMSDb / .Settings}
12月8日至3日:08:58.526:I / ActivityManager(59):显示活动com.SMSDb / .Settings:665毫秒(总665毫秒)
12月8日至3日:09:00.438:W / KeyCharacterMap(10469):无键盘ID 0
12月8日至3日:09:00.438:W / KeyCharacterMap(10469):使用默认的键盘对应:/system/usr/keychars/qwerty.kcm.bin
12月8日至3日:09:04.646:I / ActivityManager(59):启动活动:意向{CMP = com.SMSDb / .SMSDbActivity}
12月8日至3日:09:05.316:I / ActivityManager(59):显示活动com.SMSDb / .SMSDbActivity:535毫秒(总535毫秒)


解决方案

可能的问题是,你没有运行模拟器您的应用程序的全新副本。由于这个code用于创建应用程序的新安装一个新的SQLite数据库没有被选中,但是这总是发生在你的移动设备怎么把它将使应用程序的全新安装。因此,尝试创建应用程序的SQLite数据库的一部分调试。它可能会解决问题!

I have an Android app that saves the values from different EditText boxes on pressing "SAVE" Button to a Sqlite database. This app works fine on Emulator and gives desired output. But app shows "Force Close" error on pressing "SAVE" Button in mobile device.

I have worked on Sqlite database previously and I am pretty sure there is no error in that part. Then what is the problem. Please Help.

Here are the LogCat entries it if help :-

08-03 12:08:28.875: I/ActivityManager(59): Starting activity: Intent {cmp=com.SMSDb/.Settings }
08-03 12:08:29.665: I/ActivityManager(59): Displayed activity com.SMSDb/.Settings: 744 ms (total 744 ms)
08-03 12:08:47.126: D/dalvikvm(10469): GC_FOR_MALLOC freed 6935 objects / 332488 bytes in 108ms
08-03 12:08:47.155: I/ActivityManager(59): Starting activity: Intent { cmp=com.SMSDb/.SMSDbActivity }
08-03 12:08:47.765: I/ActivityManager(59): Displayed activity com.SMSDb/.SMSDbActivity: 498 ms (total 498 ms)
08-03 12:08:57.765: I/ActivityManager(59): Starting activity: Intent { cmp=com.SMSDb/.Settings }
08-03 12:08:58.526: I/ActivityManager(59): Displayed activity com.SMSDb/.Settings: 665 ms (total 665 ms)
08-03 12:09:00.438: W/KeyCharacterMap(10469): No keyboard for id 0
08-03 12:09:00.438: W/KeyCharacterMap(10469): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
08-03 12:09:04.646: I/ActivityManager(59): Starting activity: Intent { cmp=com.SMSDb/.SMSDbActivity }
08-03 12:09:05.316: I/ActivityManager(59): Displayed activity com.SMSDb/.SMSDbActivity: 535 ms (total 535 ms)

解决方案

May be the problem is that you are not running a fresh copy of your app on Emulator. Due to this the code for creating a new SQLite database for new installation of your Application is not checked, but this always happens in your Mobile device coz it would make a fresh installation of App. So try debugging on "Create" part of SQLite db of app. It may solve the problem !!

这篇关于应用程序工作正常,在模拟器而不是移动设备上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆