Permalink
Browse files

修复as热启动崩溃问题

  • Loading branch information...
AriaLyy committed Jun 17, 2017
1 parent 66f4a7e commit cd964d600e3b46a05fcf7a2e83679d2de0d75f68
View
@@ -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 @@ private void updateRowID() {
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 @@ private static SQLiteDatabase checkDb(SQLiteDatabase db) {
* @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())
View
@@ -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"
View
@@ -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'
@@ -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

0 comments on commit cd964d6

Please sign in to comment.