简体   繁体   中英

java.lang.IllegalArgumentException: column '_data' does not exist. Available columns: []

--------- beginning of crash E/AndroidRuntime: FATAL EXCEPTION: main Process: com.ppcart, PID: 3019 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ppcart/com.ppcart.MainActivity}: java.lang.IllegalArgumentException: column '_data' does not exist. Available columns: [] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at ZC31B32364CE19C A8FCD150A417ECCE58Z.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.IllegalArgumentException: column '_data' does not exist. Available columns: [] at android.database.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:352) at android.database.CursorWrapper.getColumnIndexOrThrow(CursorWrapper.java:91) at com.ppcart.MainActivity.getPath(MainActivity.java:156) at com.ppcart.MainActivity.onCreate(MainActivity.java:99) at android.app.Activity.performCreate(Activity.java:7802) at android.app.Activity.performCreate(Activity.java:7791) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) at android.app.ActivityThread.performLaunchActivity(ActivityThread.Z93F7 25A07423FE1C889F448B33D21F46Z:3245) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at ZC31B32364CE19CA8FCD150A417EC CE58Z.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) I/Process: Sending signal. PID: 3019 SIG: 9

Read the stacktrace, it says the problem in it. (java.lang.IllegalArgumentException: column '_data' does not exist). I just googled (java.lang.IllegalArgumentException: column 'foo' does not exist) and it came up with an answer. Here's the link to it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM