fix(app): BuildActivity crash when package.json is illegal

This commit is contained in:
hyb1996 committed 2018-05-29 11:07:42 +08:00
1 parent 0ffb8d1ec5
commit aa770b2ffb
2 files changed
+3 -3

No files matched your search

@@ -55,7 +55,7 @@ public class ProjectConfig {
public static ProjectConfig fromAssets(Context context, String path) { public static ProjectConfig fromAssets(Context context, String path) {
try { try {
return fromJson(PFiles.read(context.getAssets().open(path))); return fromJson(PFiles.read(context.getAssets().open(path)));
} catch (IOException e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return null; return null;
} }
@@ -64,7 +64,7 @@ public class ProjectConfig {
public static ProjectConfig fromFile(String path) { public static ProjectConfig fromFile(String path) {
try { try {
return fromJson(PFiles.read(path)); return fromJson(PFiles.read(path));
} catch (UncheckedIOException e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return null; return null;
} }
+1 -1
View File
@@ -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"}}] [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":401},"path":"commonRelease-4.0.0 Alpha1.apk","properties":{"packageId":"org.autojs.autojs","split":"","minSdkVersion":"17"}}]