我的应用程序运行良好,但是当我们第一次升级它时,它显示我们在 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)