From 05738ec204dcef642c02d3345fd15601686cf437 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Fri, 11 Apr 2025 10:16:51 +0800 Subject: [PATCH] fix android build --- Example/testHotUpdate/src/index.tsx | 15 ++++++++------- .../reactnative/modules/update/UpdateModule.java | 2 +- package.json | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Example/testHotUpdate/src/index.tsx b/Example/testHotUpdate/src/index.tsx index ea78770..e79a7ad 100644 --- a/Example/testHotUpdate/src/index.tsx +++ b/Example/testHotUpdate/src/index.tsx @@ -204,17 +204,18 @@ const styles = StyleSheet.create({ }); // use Pushy for China users -// const updateClient = new Pushy({ +const updateClient = new Pushy({ + appKey, + debug: true, + // updateStrategy: 'silentAndLater', +}); + +// use Cresc for global users +// const updateClient = new Cresc({ // appKey, // debug: true, // }); -// use Cresc for global users -const updateClient = new Cresc({ - appKey, - debug: true, -}); - export default function Root() { return ( diff --git a/android/src/newarch/cn/reactnative/modules/update/UpdateModule.java b/android/src/newarch/cn/reactnative/modules/update/UpdateModule.java index 54ffb0a..854615f 100644 --- a/android/src/newarch/cn/reactnative/modules/update/UpdateModule.java +++ b/android/src/newarch/cn/reactnative/modules/update/UpdateModule.java @@ -99,7 +99,7 @@ public class UpdateModule extends NativePushySpec { @Override public void restartApp(Promise promise) { - UpdateModuleImpl.restartApp(updateContext, mContext, promise); + UpdateModuleImpl.restartApp(mContext, promise); } @Override diff --git a/package.json b/package.json index 6374c36..d97ec4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update", - "version": "10.28.0", + "version": "10.28.1", "description": "react-native hot update", "main": "src/index", "scripts": {