我怎么能不访问硬件调试看似硬件相关的问题,我的Andr​​oid应用程序? [英] How can I debug a seemingly hardware-dependent issue with my Android app without access to the hardware?

查看:85
本文介绍了我怎么能不访问硬件调试看似硬件相关的问题,我的Andr​​oid应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Android市场上的一个开放源代码的应用程序。它似乎好工作,我(拥有1000有效安装,我不得不presume它适用于大多数人)。

I have an open-source application on the Android market. It seems to work fine for me (with over 1,000 active installs, I have to presume that it works for most people).

我最近买了一个错误报告说说明一个问题,在三星手机至少有三个用户(拦截和Captivate的)。我一直无法重现该问题在我的ADP2和仿真器。

I recently got a bug report that indicated a problem for at least three users on Samsung phones (Intercept and Captivate). I have been unable to reproduce the problem on my ADP2 and on the emulator.

为了获得足够的数据来诊断问题,我第一次尝试添加记录,然后我要求用户通过的日志收集。每次用户试图发送日志(有四次尝试),它被截断,我没有得到任何有用的数据。

In order to get enough data to diagnose the problem, I first tried to add logging and then I asked users to submit logs via Log Collector. Each time a user tried to send the log (there were four attempts), it was truncated and I did not get any useful data.

我加入 ACRA 的项目,企图获取信息,但我不'吨似乎能够自动检测错误,以发送报告。

I then added ACRA to the project in an attempt to get information, but I don't seem to be able to automatically detect the bug in order to send a report.

由于我没有三星手机,我不能复制任何东西在那里我可以与调试器连接,我主要的想法。我已经离开了唯一的想法是添加一个按钮,用户界面​​生成报告。

Since I don't have a Samsung phone and I can't reproduce it on anything where I could connect with the debugger, I am mostly out of ideas. The only idea I have left is to add a button to the UI to generate a report.

还有没有其他的方法来建议?

Are there any other approaches to suggest?

更新:既然人都在要求更多的细节:基本上,应用程序读取来自资产的文本文件,并把它们(一些preprocessing)成在滚动型一个TextView。 (该数据prgressively加到SpannableStringBuffer,然后被传递到的TextView的的setText()函数。)根据所选择的选项,所显示的文字是15K-115K之间。在手机这个问题,则会显示文本的一部分。截止点取决于选项,但似乎是17K-18K之间。

Update: since people are asking for more specifics: essentially, the app reads in text files from the assets and puts them (with some preprocessing) into a TextView in a ScrollView. (The data is prgressively added to a SpannableStringBuffer and then that is passed to TextView's setText() function.) Depending on the options chosen, the text displayed is between 15k-115k. On phones with this issue, only part of the text is displayed. The cutoff point depends on the options, but seems to be somewhere between 17k-18k.

ACRA发送报告为所有捕获的异常,并将它们放入一个谷歌表单/ S preadsheet。我已经得到从我的仿真器,并从我的电话的报道,让我知道,结束工作。 (事实上​​,我经常发现它更快地从该报告中,而不是将调试器附加到进程的堆栈跟踪调试。)

ACRA sends a report for all uncaught exceptions and puts them into a Google Form/Spreadsheet. I've gotten reports from my emulator and from my phone, so I know that end works. (Actually, I've often found it faster to debug from the stack trace in that report than to attach the debugger to the process.)

手机规格:我行使应用程序上运行的1.5,1.6,2.1,和2.2模拟器。我的手机是ADP2(的的myTouch的开发者版本),但我已经安装了第三方ROM 以跳起来升级Froyo(2.2)。我不知道专为三星OS构建一个仿真的,尽管这在这里是非常有帮助的。

Phone specs: I have exercised the app on emulators running 1.5, 1.6, 2.1, and 2.2. My phone is ADP2 (the developer version of the MyTouch), but I've installed a third-party ROM to jump up to Froyo (2.2). I am unaware of an emulator specifically for the Samsung OS build, although that would be quite helpful here.

由于预期的文本长度是恒定的,I 的能够检测它是否被正确或不读出。予加检查在我的文本处理的结束,但这些决不触发,表明该问题不是与读取该文件。然后我尝试添加检查onPostCreate和onPostResume,但这些并没有失败,无论是。看来,在UI线程还没有真正在这一点上运行,但。

Since the expected text length is constant, I should be able to detect if it is read correctly or not. I added checks at the end of my text processing, but those never triggered, indicating that the problem was not with reading the file. I then tried adding checks to onPostCreate and onPostResume, but those did not fail either. It seems that the UI thread had not yet actually run at that point, though.

我现在已经做了附加到bug跟踪系统错误6私人APK版本。坦白说,我很惊讶,任何用户都还在尝试他们。这个最新版本有一个按钮强制报告bug - 将只能被称为后的UI线程奠定了在屏幕上。希望这会给我足够的可变信息点我在正确的方向。

I've now done 6 private APK versions attached to the bug in the bug tracker. I frankly am surprised that any users are still trying them. This latest version has a button to force a bug report - that will only be called after the UI thread has laid out the screen. Hopefully that will give me enough variable information to point me in the right direction.

推荐答案

我们就需要更多地了解问题的性质。它是一个崩溃?事情看起来不正确?等等。

We'd need to know more about the nature of the problem. Is it a crash? Something doesn't look right? Etc.

如果它的崩溃,你可以添加一个崩溃处理程序(Thread.setUncaughtExceptionHandler,IIRC),并具有创建可以有选择地发送给你一个更好的格式的日志。

If it's a crash, you could add a crash handler (Thread.setUncaughtExceptionHandler, IIRC) and have that create a better-formatted log that can optionally be sent to you.

另外,尽量收集有关的手机(操作系统,分辨率等)的规格信息和清样,在调试器。这些三星手机拥有Android 2.1的 - 你的Nexus可能有2.2?你有没有尝试设置仿真器为使用2.1?

Also, try to collect information about the specs of the phones (OS, resolution, etc) and repro that in the debugger. Those Samsung phones have Android 2.1 - your Nexus probably has 2.2? Did you try setting the emulator up to use 2.1?

每当我有这些问题,我礼貌地问那些谁写的我,如果他们有兴趣帮助我 - 并有通常几个人谁是热衷于志愿者。我给他们一个APK文件与一个特殊的测试版本,有额外的调试输出,并且帮我缩小问题。

Whenever I had these issues, I politely asked those who wrote me if they were interested in helping me - and there were typically several people who were eager to volunteer. I sent them an APK file with a special test version that had additional debug output, and that helped me narrow down the problem.

这篇关于我怎么能不访问硬件调试看似硬件相关的问题,我的Andr​​oid应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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