From aa770b2ffbb5b612b4cf54a820d65400608ba90c Mon Sep 17 00:00:00 2001 From: hyb1996 <946994919@qq.com> Date: Tue, 29 May 2018 11:07:42 +0800 Subject: [PATCH] fix(app): BuildActivity crash when package.json is illegal --- .../main/java/com/stardust/autojs/project/ProjectConfig.java | 4 ++-- common/release/output.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autojs/src/main/java/com/stardust/autojs/project/ProjectConfig.java b/autojs/src/main/java/com/stardust/autojs/project/ProjectConfig.java index 623ef018..28e06833 100644 --- a/autojs/src/main/java/com/stardust/autojs/project/ProjectConfig.java +++ b/autojs/src/main/java/com/stardust/autojs/project/ProjectConfig.java @@ -55,7 +55,7 @@ public class ProjectConfig { public static ProjectConfig fromAssets(Context context, String path) { try { return fromJson(PFiles.read(context.getAssets().open(path))); - } catch (IOException e) { + } catch (Exception e) { e.printStackTrace(); return null; } @@ -64,7 +64,7 @@ public class ProjectConfig { public static ProjectConfig fromFile(String path) { try { return fromJson(PFiles.read(path)); - } catch (UncheckedIOException e) { + } catch (Exception e) { e.printStackTrace(); return null; } diff --git a/common/release/output.json b/common/release/output.json index 9660bb09..fc21bded 100644 --- a/common/release/output.json +++ b/common/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":263},"path":"commonRelease-4.0.0 Alpha.apk","properties":{"packageId":"org.autojs.autojs","split":"","minSdkVersion":"17"}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":401},"path":"commonRelease-4.0.0 Alpha1.apk","properties":{"packageId":"org.autojs.autojs","split":"","minSdkVersion":"17"}}] \ No newline at end of file