diff --git a/android/src/main/java/com/example/r_upgrade/common/GenerateAndInstallAsyncTask.java b/android/src/main/java/com/example/r_upgrade/common/GenerateAndInstallAsyncTask.java index 6c390a8..4d5f2ae 100644 --- a/android/src/main/java/com/example/r_upgrade/common/GenerateAndInstallAsyncTask.java +++ b/android/src/main/java/com/example/r_upgrade/common/GenerateAndInstallAsyncTask.java @@ -61,6 +61,7 @@ protected Uri doInBackground(Integer... integers) { } if (upgradeFlavor == UpgradeSQLite.UPGRADE_FLAVOR_INCREMENT) { String newPath = new IncrementUpgradeManager(contextWrapper.get()).mixinAndGetNewApk(path); + RUpgradeLogger.get().d(TAG,"合成成功,新的安装包路径:"+newPath); if (newPath == null) return null; file = new File(newPath); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { diff --git a/android/src/main/java/com/example/r_upgrade/common/IncrementUpgradeManager.java b/android/src/main/java/com/example/r_upgrade/common/IncrementUpgradeManager.java index 0812dc0..91d917f 100644 --- a/android/src/main/java/com/example/r_upgrade/common/IncrementUpgradeManager.java +++ b/android/src/main/java/com/example/r_upgrade/common/IncrementUpgradeManager.java @@ -30,9 +30,10 @@ public String mixinAndGetNewApk(String patchPath) { } newApkFile.createNewFile(); rUpgradeLib.mixinPatch(oldApkPath, patchPath, newApkFile.getPath()); - RUpgradeLogger.get().d(TAG, String.format("mixinAndGetNewApk: %s",newApkFile.getPath())); + RUpgradeLogger.get().d(TAG, "mixinAndGetNewApk"+newApkFile.getPath()); return newApkFile.getPath(); } catch (Exception e) { + RUpgradeLogger.get().d(TAG, "合成失败:"); e.printStackTrace(); } return null; diff --git a/android/src/main/java/com/example/r_upgrade/common/UpgradeSQLite.java b/android/src/main/java/com/example/r_upgrade/common/UpgradeSQLite.java index 9c4d829..1961d45 100644 --- a/android/src/main/java/com/example/r_upgrade/common/UpgradeSQLite.java +++ b/android/src/main/java/com/example/r_upgrade/common/UpgradeSQLite.java @@ -47,7 +47,7 @@ public synchronized static UpgradeSQLite getInstance(Context context) { public static final String UPGRADE_FLAVOR = "upgrade_flavor"; public static final int UPGRADE_FLAVOR_Normal = 0; public static final int UPGRADE_FLAVOR_HOT_UPDATE = 1; - public static final int UPGRADE_FLAVOR_INCREMENT = 3; + public static final int UPGRADE_FLAVOR_INCREMENT = 2; private static final String DATABASE_CREATE = "create table if not exists " + VERSION_MANAGER + "(" + ID + " integer primary key autoincrement," + diff --git a/example/lib/main.dart b/example/lib/main.dart index 4f645ba..fbc3a0b 100755 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -28,6 +28,7 @@ class _MyAppState extends State { @override void initState() { super.initState(); + RUpgrade.setDebug(true); } Widget _buildMultiPlatformWidget() { diff --git a/example/pubspec.yaml b/example/pubspec.yaml index a8ef0de..b398549 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,7 +1,7 @@ name: r_upgrade_example description: Demonstrates how to use the r_upgrade plugin. publish_to: 'none' -version: 1.0.0+1 +version: 1.0.0+0 environment: sdk: ">=2.1.0 <3.0.0"