Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
```

Expand Down Expand Up @@ -332,6 +338,12 @@ class MainApplication : Application(), ReactApplication {
</TabItem>
</Tabs>

Before building and running your code on an emulator, we recommend cleaning your Android build to avoid potential issues:

```bash
cd android && ./gradlew clean
```

Comment thread
gabriel-logan marked this conversation as resolved.
Outdated
You can now build and run your code on an emulator:

<Tabs groupId="package-manager" queryString defaultValue={constants.defaultPackageManager} values={constants.packageManagers}>
Expand Down