2016-03-31 47 views
-6
Caused by: android.database.sqlite.SQLiteException: no such column: Over_the_horizon.mp3 (code 1): , while compiling: insert into musics(song_name,album_name,artist_name,full_path) values(Over_the_horizon.mp3,Samsung,Samsung,a/storage/emulated/0/Samsung/Music/Over_the_horizon.mp3) 

回答

2

SQL中的字符串文字用单引号(')表示,您的values子句缺失。 添加它们,您应该可以:

INSERT INTO musics 
(song_name, album_name, artist_name, full_path) 
VALUES ('Over_the_horizon.mp3', 
     'Samsung', 
     'Samsung', 
     'a/storage/emulated/0/Samsung/Music/Over_the_horizon.mp3')