我的应用程序工作正常,但是当我们第一次升级时,它会显示我们在Google Play中的堆栈跟踪中出现的错误。
我的代码:
public Cursor getContentData(String pc, String sc) {
return database.rawQuery("SELECT * FROM content where pc=" + pc
+ " and sc=" + sc + "", null);
}
错误
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:200)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1027)
Caused by: java.lang.IllegalStateException: get field slot from row 0 col 16 failed
at android.database.CursorWindow.getString_native(Native Method)
at android.database.CursorWindow.getString(CursorWindow.java:369)
at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:49)
at com.zengamedia.parser.LoadLiveData.doInBackground(LoadLiveData.java:68)
at com.zengamedia.parser.LoadLiveData.doInBackground(LoadLiveData.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:185)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
答案 0 :(得分:1)
正如您的错误在线下所示:
引起:java.lang.IllegalStateException:从第0行获取字段槽 第16栏失败
可能第17列是您的数据库查询语句中缺少的一些内容。