i am trying to run task2new(app) in my android phone but it is crashing due to following error -


i trying run task2new(app) on android phone crashing due following error:

04-08 01:47:14.393 7613-29629/com.example.cbluser12.task2new w/openglrenderer: failed choose config egl_swap_behavior_preserved, retrying without... 04-08 01:47:24.727 7613-7613/com.example.cbluser12.task2new e/sqlitelog: (1) near "19.2": syntax error 04-08 01:47:24.727 7613-7613/com.example.cbluser12.task2new d/androidruntime: shutting down vm 04-08 01:47:24.728 7613-7613/com.example.cbluser12.task2new e/androidruntime: fatal exception: main  process: com.example.cbluser12.task2new, pid: 7613 android.database.sqlite.sqliteexception: near "19.2": syntax error (code 1): , while compiling: select * mylocations id = '37°25'19.2"n 122°05'02.4"w' @ android.database.sqlite.sqliteconnection.nativepreparestatement(native method) @ android.database.sqlite.sqliteconnection.acquirepreparedstatement(sqliteconnection.java:887) @ android.database.sqlite.sqliteconnection.prepare(sqliteconnection.java:498) @ android.database.sqlite.sqlitesession.prepare(sqlitesession.java:588) @ android.database.sqlite.sqliteprogram.<init>(sqliteprogram.java:58) @ android.database.sqlite.sqlitequery.<init>(sqlitequery.java:37) @ android.database.sqlite.sqlitedirectcursordriver.query(sqlitedirectcursordriver.java:44) @ android.database.sqlite.sqlitedatabase.rawquerywithfactory(sqlitedatabase.java:1316) @ android.database.sqlite.sqlitedatabase.rawquery(sqlitedatabase.java:1255) @ com.example.cbluser12.task2new.database.mydatabasehelper.checkentry(mydatabasehelper.java:77) @ com.example.cbluser12.task2new.mainactivity.onclick(mainactivity.java:138) @ android.view.view.performclick(view.java:5198) @ android.view.view$performclick.run(view.java:21147) @ android.os.handler.handlecallback(handler.java:739) @ android.os.handler.dispatchmessage(handler.java:95) @ android.os.looper.loop(looper.java:148) @ android.app.activitythread.main(activitythread.java:5417) @ java.lang.reflect.method.invoke(native method) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:726) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:616) 04-08 01:52:24.865 7613-7613/com.example.cbluser12.task2new i/process: sending signal. pid: 7613 sig: 9 

i suppose issue apostrophe: 37°25'19.2"n 122°05'02.4.

replace ' , " "\'" , "\"" commit database.

 string newstring = yourstring.replace("'","\'").replace("\"", "\\""); 

Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -