修复as热启动崩溃问题
This commit is contained in:
@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '25.0.2'
|
||||
buildToolsVersion '25.0.3'
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 9
|
||||
|
@ -161,8 +161,7 @@ public class DbEntity {
|
||||
List<String> values = new ArrayList<>();
|
||||
for (Field field : fields) {
|
||||
field.setAccessible(true);
|
||||
Ignore ignore = field.getAnnotation(Ignore.class);
|
||||
if (ignore != null && ignore.value()) {
|
||||
if (SqlHelper.ignoreField(field)) {
|
||||
continue;
|
||||
}
|
||||
where.add(field.getName());
|
||||
|
@ -511,7 +511,7 @@ final class SqlHelper extends SQLiteOpenHelper {
|
||||
* @return true 忽略该字段
|
||||
*/
|
||||
static boolean ignoreField(Field field) {
|
||||
// field.isSynthetic(), 使用as热启动App时,AS会自动给你的clss添加change字段
|
||||
// field.isSynthetic(), 使用as热启动App时,AS会自动给你的class添加change字段
|
||||
Ignore ignore = field.getAnnotation(Ignore.class);
|
||||
int modifiers = field.getModifiers();
|
||||
return (ignore != null && ignore.value())
|
||||
|
Reference in New Issue
Block a user