2012-12-17 60 views
1

我的應用工作正常,但是當我們第一次升級它時,它顯示我們在Google Play中獲取堆棧跟蹤的錯誤。java.lang.IllegalStateException:從第0行獲取字段插槽col 16失敗

我的代碼:

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列是一些如何在你的數據庫查詢語句失蹤。

相關問題