From ba3bbb92dc65773b3d1de5495264d13a4c2bc1f6 Mon Sep 17 00:00:00 2001 From: Gabriel Logan <96627244+gabriel-logan@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:38:05 -0300 Subject: [PATCH 1/2] docs: update turbo-native-modules-android.md The clear method was missing in the Java version and I added information to clean the build for possible errors. --- .../version-0.80/turbo-native-modules-android.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/versioned_docs/version-0.80/turbo-native-modules-android.md b/website/versioned_docs/version-0.80/turbo-native-modules-android.md index 2231baa9b21..53cb00fa844 100644 --- a/website/versioned_docs/version-0.80/turbo-native-modules-android.md +++ b/website/versioned_docs/version-0.80/turbo-native-modules-android.md @@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec { SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); sharedPref.edit().remove(key).apply(); } + + @Override + public void clear() { + SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); + sharedPref.edit().clear().apply(); + } } ``` @@ -332,6 +338,12 @@ class MainApplication : Application(), ReactApplication { +Before building and running your code on an emulator, we recommend cleaning your Android build to avoid potential issues: + +```bash +cd android && ./gradlew clean +``` + You can now build and run your code on an emulator: From 7fb74acd2f811a81e28f5640f993ed05ec6c7334 Mon Sep 17 00:00:00 2001 From: Gabriel Logan <96627244+gabriel-logan@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:21:26 -0300 Subject: [PATCH 2/2] chore: update turbo-native-modules-android.md Remove clean build --- .../version-0.80/turbo-native-modules-android.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/website/versioned_docs/version-0.80/turbo-native-modules-android.md b/website/versioned_docs/version-0.80/turbo-native-modules-android.md index 53cb00fa844..21fbd7703e1 100644 --- a/website/versioned_docs/version-0.80/turbo-native-modules-android.md +++ b/website/versioned_docs/version-0.80/turbo-native-modules-android.md @@ -338,12 +338,6 @@ class MainApplication : Application(), ReactApplication { -Before building and running your code on an emulator, we recommend cleaning your Android build to avoid potential issues: - -```bash -cd android && ./gradlew clean -``` - You can now build and run your code on an emulator: