在ANDORID STUDIO产生如下错误 怎么解决

在Android Studio中运行应用时遇到了无法打开SQLite数据库的问题,错误代码14,具体表现为不能打开/local/socket路径的文件。错误出现在course.navigation.GraphOverlay类的drawMyMap方法中。此外,InstantRun也报错,提示地址已被使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

06-16 13:43:01.120 6476-6476/course.navigation E/InstantRun: Could not find slices in APK; aborting.
06-16 13:43:01.765 6476-6544/course.navigation E/SQLiteLog: (14) cannot open file at line 30197 of [000197cc4e]
06-16 13:43:01.765 6476-6544/course.navigation E/SQLiteLog: (14) os_unix.c:30197: (2) open(/storage/emulated/0/NaviCourse/data/campus_map.db) - 
06-16 13:43:01.770 6476-6544/course.navigation E/SQLiteDatabase: Failed to open database '/storage/emulated/0/NaviCourse/data/campus_map.db'.
                                                                 android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
                                                                     at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
                                                                     at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
                                                                     at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
                                                                     at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
                                                                     at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
                                                                     at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
                                                                     at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:804)
                                                                     at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:789)
                                                                     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
                                                                     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:669)
                                                                     at course.navigation.GraphOverlay.drawMyMap(GraphOverlay.java:58)
                                                                     at course.navigation.GraphOverlay$1.run(GraphOverlay.java:49)
                                                                     at java.lang.Thread.run(Thread.java:841)
06-16 13:43:02.225 6561-6561/course.navigation:remote E/InstantRun: IO Error creating local socket at course.navigation
                                                                    java.io.IOException: Address already in use
                                                                        at android.net.LocalSocketImpl.bindLocal(Native Method)
                                                                        at android.net.LocalSocketImpl.bind(LocalSocketImpl.java:317)
                                                                        at android.net.LocalServerSocket.<init>(LocalServerSocket.java:52)
                                                                        at com.android.tools.fd.runtime.Server.<init>(Server.java:94)
                                                                        at com.android.tools.fd.runtime.Server.create(Server.java:88)
                                                                        at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:315)
                                                                        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009)
                                                                        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613)
                                                                        at android.app.ActivityThread.access$1800(ActivityThread.java:139)
                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
                                                                        at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                        at android.os.Looper.loop(Looper.java:136)
                                                                        at android.app.ActivityThread.main(ActivityThread.java:5314)
                                                                        at java.lang.reflect.Method.invokeNative(Native Method)
                                                                        at java.lang.reflect.Method.invoke(Method.java:515)
                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
                                                                        at dalvik.system.NativeStart.main(Native Method)
06-16 13:43:08.880 6698-6731/course.navigation E/SQLiteLog: (14) cannot open file at line 30197 of [000197cc4e]
06-16 13:43:08.880 6698-6731/course.navigation E/SQLiteLog: (14) os_unix.c:30197: (2) open(/storage/emulated/0/NaviCourse/data/campus_map.db) - 
06-16 13:43:08.885 6698-6731/course.navigation E/SQLiteDatabase: Failed to open database '/storage/emulated/0/NaviCourse/data/campus_map.db'.
                                                                 android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
                                                                     at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
                                                                     at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
                                                                     at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
                                                                     at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
                                                                     at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
                                                                     at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
                                                                     at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:804)
                                                                     at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:789)
                                                                     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
                                                                     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:669)
                                                                     at course.navigation.GraphOverlay.drawMyMap(GraphOverlay.java:58)
                                                                     at course.navigation.GraphOverlay$1.run(GraphOverlay.java:49)
                                                                     at java.lang.Thread.run(Thread.java:841)
06-16 13:43:09.355 6747-6747/course.navigation:remote E/InstantRun: IO Error creating local socket at course.navigation
                                                                    java.io.IOException: Address already in use
                                                                        at android.net.LocalSocketImpl.bindLocal(Native Method)
                                                                        at android.net.LocalSocketImpl.bind(LocalSocketImpl.java:317)
                                                                        at android.net.LocalServerSocket.<init>(LocalServerSocket.java:52)
                                                                        at com.android.tools.fd.runtime.Server.<init>(Server.java:94)
                                                                        at com.android.tools.fd.runtime.Server.create(Server.java:88)
                                                                        at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:315)
                                                                        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009)
                                                                        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613)
                                                                        at android.app.ActivityThread.access$1800(ActivityThread.java:139)
                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
                                                                        at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                        at android.os.Looper.loop(Looper.java:136)
                                                                        at android.app.ActivityThread.main(ActivityThread.java:5314)
                                                                        at java.lang.reflect.Method.invokeNative(Native Method)
                                                                        at java.lang.reflect.Method.invoke(Method.java:515)
                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
                                                                        at dalvik.system.NativeStart.main(Native Method)
06-16 13:46:20.470 6992-7089/course.navigation E/SQLiteLog: (14) cannot open file at line 30197 of [000197cc4e]
06-16 13:46:20.470 6992-7089/course.navigation E/SQLiteLog: (14) os_unix.c:30197: (2) open(/storage/emulated/0/NaviCourse/data/campus_map.db) - 
06-16 13:46:20.470 6992-7089/course.navigation E/SQLiteDatabase: Failed to open database '/storage/emulated/0/NaviCourse/data/campus_map.db'.
                                                                 android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
                                                                     at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
                                                                     at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
                                                                     at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
                                                                     at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
                                                                     at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
                                                                     at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
                                                                     at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:804)
                                                                     at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:789)
                                                                     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
                                                                     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:669)
                                                                     at course.navigation.GraphOverlay.drawMyMap(GraphOverlay.java:58)
                                                                     at course.navigation.GraphOverlay$1.run(GraphOverlay.java:49)
                                                                     at java.lang.Thread.run(Thread.java:841)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值