Helper = new myDBHelper(this);
sqlDB = Helper.getReadableDatabase();
Cursor cursor;
cursor = sqlDB.rawQuery("SELECT * FROM readTBL;", null);
String[] result = new String[8];
for(int i=0; i<8; i++){
cursor.moveToNext();
result[i] = cursor.getString(0);
}
int j = 0;
for(int k=0; k<8; k++){
for(int i=0; i<4; i++){
if(result[k] == votedBook[i]){
cursor.moveToPosition(k);
et[j].setText(cursor.getString(0));
j++;
}
}
}
votedBook 배열의 데이터를 이용해서 같은 행의 다른 열을 출력하고 싶습니다ㅠㅠㅠ
votedBook에는 title 열의 자료가 들어 있는 상태입니다! 그래서 같은 cursor행의 author열을 출력하고 싶습니다ㅠㅠ
아래같은 에러가 뜹니다ㅠㅠ
제발 도와주세요ㅠㅠ
2021-05-11 17:05:33.031 7074-7074/? I/com.example.pj: Not late-enabling -Xcheck:jni (already on)
2021-05-11 17:05:33.051 7074-7074/? I/com.example.pj: Unquickening 12 vdex files!
2021-05-11 17:05:33.052 7074-7074/? W/com.example.pj: Unexpected CPU variant for X86 using defaults: x86
2021-05-11 17:05:33.378 7074-7074/com.example.pj D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-05-11 17:05:33.379 7074-7074/com.example.pj D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-05-11 17:05:33.427 7074-7115/com.example.pj D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so
2021-05-11 17:05:33.441 7074-7115/com.example.pj D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
2021-05-11 17:05:33.451 7074-7115/com.example.pj D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so
2021-05-11 17:05:33.601 7074-7074/com.example.pj W/com.example.pj: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
2021-05-11 17:05:33.602 7074-7074/com.example.pj W/com.example.pj: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2021-05-11 17:05:33.701 7074-7074/com.example.pj W/FileUtils: Failed to chmod(/data/user/0/com.example.pj/databases/readDB.db): android.system.ErrnoException: chmod failed: EPERM (Operation not permitted)
2021-05-11 17:05:33.821 7074-7113/com.example.pj D/HostConnection: HostConnection::get() New Host Connection established 0xeb3e0760, tid 7113
2021-05-11 17:05:33.827 7074-7113/com.example.pj D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
2021-05-11 17:05:33.828 7074-7113/com.example.pj W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2021-05-11 17:05:33.833 7074-7113/com.example.pj D/EGL_emulation: eglCreateContext: 0xeb3ded20: maj 2 min 0 rcv 2
2021-05-11 17:05:33.857 7074-7113/com.example.pj D/EGL_emulation: eglMakeCurrent: 0xeb3ded20: ver 2 0 (tinfo 0xeb6f8e30) (first time)
2021-05-11 17:05:33.869 7074-7113/com.example.pj I/Gralloc4: mapper 4.x is not supported
2021-05-11 17:05:33.869 7074-7113/com.example.pj D/HostConnection: createUnique: call
2021-05-11 17:05:33.870 7074-7113/com.example.pj D/HostConnection: HostConnection::get() New Host Connection established 0xeb3df0a0, tid 7113
2021-05-11 17:05:33.870 7074-7113/com.example.pj D/goldfish-address-space: allocate: Ask for block of size 0x100
2021-05-11 17:05:33.889 7074-7113/com.example.pj D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3fd1ed000 size 0x2000
2021-05-11 17:05:33.893 7074-7113/com.example.pj D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
2021-05-11 17:05:41.954 7074-7074/com.example.pj W/FileUtils: Failed to chmod(/data/user/0/com.example.pj/databases/readDB.db): android.system.ErrnoException: chmod failed: EPERM (Operation not permitted)