修复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())
|
||||
|
@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '25.0.2'
|
||||
buildToolsVersion '25.0.3'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.arialyy.simple"
|
||||
|
@ -5,6 +5,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
// classpath 'com.android.tools.build:gradle:2.3.0'
|
||||
classpath 'com.android.tools.build:gradle:2.2.2'
|
||||
// classpath 'com.novoda:bintray-release:0.5.0'
|
||||
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
|
||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
#distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
|
||||
#distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
|
||||
|
Reference in New Issue
Block a user