Android studio 2.0 使用SQLite时错误

一、现象:android

手机上调测时报错:android.database.sqlite.SQLiteException: near "$change": syntax error (code 1):sql

在使用SQLite动态建立表时报错,多了一个$change字段。工具

因而反复读代码,发现应该不会有$change这个字段。表字段是经过注解方式实现,getDeclareFields方式获取的字段。ui

二、通过查找,发现多了一个code

public static transient volatile com.android.tools.fd.runtime.IncrementalChange这么信息,是系统自动生成的。因而怀疑是工具的缘由sqlite

 

三、查找后发现,是android studio2.0的Instant Run功能致使,默认该功能是开启的。关闭了该功能就好使了。rem

 

设置目录在settings->Build,Execution,Developmen->Instant Run中get

相关文章
相关标签/搜索