Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ClipboardModule.java #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexanderblackh
Copy link

Change removeListener arg from int to double due to NewArch changes

Overview

New Arch in 0.73 causes some issues due to type checking. Simply changed from Int to Double since the error mention it as well as the recommendation from #238

.../node_modules/@react-native-clipboard/clipboard/android/src/main/java/com/reactnativecommunity/clipboard/ClipboardModule.java:39: error: ClipboardModule is not abstract and does not override abstract method removeListeners(double) in NativeClipboardModuleSpec
public class ClipboardModule extends NativeClipboardModuleSpec {
       ^
.../node_modules/@react-native-clipboard/clipboard/android/src/main/java/com/reactnativecommunity/clipboard/ClipboardModule.java:240: error: method does not override or implement a method from a supertype
  @Override
  ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: .../node_modules/@react-native-clipboard/clipboard/android/src/main/java/com/reactnativecommunity/clipboard/ClipboardPackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors

Test Plan

Did not do any testing other then standard app usage. Before this change, I couldn't build. Now I can and everything works as anticipated

Change removeListener arg from int to double due to NewArch changes
@sync
Copy link

sync commented Jul 10, 2024

this will break if not using the new architecture

@huutritran
Copy link

FYI, react-native-codegen is treat any number as ** double** right now when building turbo module.
So this is a must have fix; but please make sure you update this spec as well in case people not using new architecture - it should not be broken @alexanderblackh @sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants