構文エラーをスローし、アプリをクラッシュさせる次の execSQL があります。一重引用符と二重引用符をエスケープしたことを考えると、理由がわかりません。
コードは次のとおりです。
database.execSQL("insert into " + TABLE_EXERCISES + " (" + COLUMN_NAME + ", " + COLUMN_PRIMARY_MUSCLE + ", " + COLUMN_SECONDARY_MUSCLE + ", " + COLUMN_EQUIPMENT_TYPE + ", " + COLUMN_STEPS + ", " + COLUMN_IMAGES + ") values ('Cable Shrugs', 'Traps', 'None', 'Cable', 'Attach a flat shoulder width bar to the lowest cable pulley. Stand with your feet shoulder width apart. Keep your abs tight and a slight bend in your knees to protect your lower back. Starting with the bar at waist height, raise your shoulders toward your ears as if you\'re saying,\"I don\'t know.\" Hold briefly at the top of the contraction then lower in a slow and controlled manner.', 'cable-shrugs-1.png|cable-shrugs-2.png')");
誰でも何か考えがありますか?
ログは次のとおりです。
12-29 23:31:54.174: E/AndroidRuntime(1207): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gauvion.gfit/com.gauvion.gfit.RoutinesActivity}: android.database.sqlite.SQLiteException: near "re": syntax error (code 1): , while compiling: insert into exercises(name, primary_muscle, secondary_muscle, equipment_type, steps, images) VALUES ('Cable Shrugs', 'Traps', 'None', 'Cable', 'Attach a flat shoulder width bar to the lowest cable pulley. Stand with your feet shoulder width apart. Keep your abs tight and a slight bend in your knees to protect your lower back. Starting with the bar at waist height, raise your shoulders toward your ears as if you're saying,"I don't know." Hold briefly at the top of the contraction then lower in a slow and controlled manner.', 'cable-shrugs-1.png|cable-shrugs-2.png')