error: Apostrophe not preceded by \ (in CREATE TABLE tb_cammonitor_configs
慕河
2023-12-01
error: Apostrophe not preceded by \ (in CREATE TABLE tb_cammonitor_configs
出错地方:
<string name="table_sql">
CREATE TABLE tb_cammonitor_configs (
_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name VARCHAR(30) NULL,
ip VARCHAR(64) NULL,
port NUMERIC NULL,
username VARCHAR(64) NULL,
password VARCHAR(64) NULL,
client_dir TEXT NULL,
connect_type NUMERIC DEFAULT '1' NULL
);
</string>
修改:
<string name="table_sql">
CREATE TABLE tb_cammonitor_configs (
_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name VARCHAR(30) NULL,
ip VARCHAR(64) NULL,
port NUMERIC NULL,
username VARCHAR(64) NULL,
password VARCHAR(64) NULL,
client_dir TEXT NULL,
connect_type NUMERIC DEFAULT \'1\' NULL
);
</string>
做转义处理,'转义\'