Problem with testing and debugging Android applications

In fact, I have two related questions regarding Android errors. I released an application update that worked fine earlier and works in the current version on my Nexus One, G1 and emulator. However, since the last update, I get a lot of error logs through the Android Market console, and I cannot reproduce the error. The application is quite simple with two actions, so checking the application is quite simple. However, there are often errors that I did not find before the release.

So the first questions: is there a way to check more deaply?

My second question is about a specific error. There seems to be a problem with the SQLite database that cannot find the table. I think that the database cannot be created in the first place, thus an error. Here's the stack trace:

BTW. With complaints there were three users with Desire HD. Is the error known?

java.lang.RuntimeException: Unable to resume activity {XXX/XXX}: android.database.sqlite.SQLiteException: no such table: main_ger: , while compiling: SELECT _id, code, area FROM main_ger at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3394) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3415) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2859) at android.app.ActivityThread.access$2300(ActivityThread.java:136) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2179) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:143) at android.app.ActivityThread.main(ActivityThread.java:5068) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) Caused by: android.database.sqlite.SQLiteException: no such table: main_ger: , while compiling: SELECT _id, code, area FROM main_ger at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method) at android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:91) at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:64) at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:80) at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:46) at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:53) at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1417) at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1301) at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1256) at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1336) at XX.XXX.DataBaseHelper.fetchAll(DataBaseHelper.java:190) at XX.XXX.fillData(mainactivity.java:240) at XX.XXX.onResume(mainactivity.java:522) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1238) at android.app.Activity.performResume(Activity.java:3904) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3384) ... 12 more 
+2
android debugging sql sqlite
source share
4 answers

There seem to be a few more people with this problem:

http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/comment-page-4/#comment-43655

Database processing stopped working on Android 2.2.1 (Desire HD 1.72.405.3)

http://forum.xda-developers.com/showthread.php?t=895942

Dev in the next article seems to have found a solution. I will try soon and let you know. Is there anyonw with desire hd that could help me check it out?

http://www.anddev.org/networking-database-problems-f29/missing-table-in-sqlite-with-specific-version-of-desire-hd-t50364.html

+2
source share

Yes, this is a known bug .... I have Desire HD, but it is not erased, so I can not check what is happening inside the FS. (data folder). My logcat is the same: (

+1
source share

We have the same problem. With this problem, we receive 5 reports per day from our users. Our application runs year-round, and we never encountered this problem before Desire HD entered the market.

+1
source share

Yes, Android supports automatic unit testing. See this article:
Android Developer Reference: Testing Basics

As for the SQLLite error, why do you think there was an attempt to create a database? Wouldn't that throw an exception? Do you check the availability of the database and its creation, if this does not happen, when your activity resumes? And do you recreate tables if they do not exist?

0
source share

Source: https://habr.com/ru/post/650906/


All Articles