• Как найти ошибку в коде java на android?

    kolodach
    @kolodach Автор вопроса
    Судя по всему где - то с id напартачил

    вот логи
    02-19 12:57:42.657: D/MainActivity(964): попытка подключения к БД
    02-19 12:57:42.729: D/MainActivity(964): Подключено!
    02-19 12:57:42.729: D/MainActivity(964): Формировка таблицы
    02-19 12:57:42.737: D/MainActivity(964): Список подключен
    02-19 12:57:42.803: D/AndroidRuntime(964): Shutting down VM
    02-19 12:57:42.803: W/dalvikvm(964): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
    02-19 12:57:42.807: E/AndroidRuntime(964): FATAL EXCEPTION: main
    02-19 12:57:42.807: E/AndroidRuntime(964): java.lang.IllegalArgumentException: column 'img' does not exist
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.database.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:302)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.widget.SimpleCursorAdapter.findColumns(SimpleCursorAdapter.java:317)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.widget.SimpleCursorAdapter.swapCursor(SimpleCursorAdapter.java:328)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at com.example.mytime.MainActivity.onLoadFinished(MainActivity.java:104)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at com.example.mytime.MainActivity.onLoadFinished(MainActivity.java:1)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:427)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:395)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.content.Loader.deliverResult(Loader.java:104)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.content.CursorLoader.deliverResult(CursorLoader.java:73)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.content.CursorLoader.deliverResult(CursorLoader.java:35)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:223)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:61)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.content.ModernAsyncTask.finish(ModernAsyncTask.java:461)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.content.ModernAsyncTask.access$500(ModernAsyncTask.java:47)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.support.v4.content.ModernAsyncTask$InternalHandler.handleMessage(ModernAsyncTask.java:474)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.os.Handler.dispatchMessage(Handler.java:99)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.os.Looper.loop(Looper.java:137)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at android.app.ActivityThread.main(ActivityThread.java:4745)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at java.lang.reflect.Method.invokeNative(Native Method)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at java.lang.reflect.Method.invoke(Method.java:511)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    02-19 12:57:42.807: E/AndroidRuntime(964): 	at dalvik.system.NativeStart.main(Native Method)