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

public class ClipboardModule extends NativeClipboardModuleSpec #238

Open
andriiradkevych opened this issue Apr 24, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@andriiradkevych
Copy link

andriiradkevych commented Apr 24, 2024

After npx react-native run-android , I get :

/Users/andreyradkevich/dev/native_cabinet/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 {
       ^
/Users/andreyradkevich/dev/native_cabinet/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: /Users/andreyradkevich/dev/native_cabinet/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

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-clipboard_clipboard:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.

BUILD FAILED in 7s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/Users/andreyradkevich/dev/native_cabinet/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 { ^
/Users/andreyradkevich/dev/native_cabinet/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: /Users/andreyradkevich/dev/native_cabinet/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 FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':react-native-clipboard_clipboard:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details. * Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights. BUILD FAILED in 7s.

package.json

    "@react-native-clipboard/clipboard": "^1.14.1",
     "react-native": "^0.73.4",
    ext {
        buildToolsVersion = findProperty('android.buildToolsVersion') ?: '34.0.0'
        minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '23')
        compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '34')
        targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34')
        kotlinVersion = findProperty('android.kotlinVersion') ?: '1.8.10'

        ndkVersion = "25.1.8937393"
    }
    ```
@Gu1K
Copy link

Gu1K commented Apr 24, 2024

same error

@vlsido
Copy link

vlsido commented Apr 29, 2024

It seems to me #237 broke build on android?

react-native 0.73.4, new arch enabled

Changing type in ClipboardModule.java fixed it for me

before:

  @Override
  public void removeListeners(int count) {

  }

after:

  @Override
  public void removeListeners(double count) {

  }

@Qdafengzi
Copy link

为何一直不更新库 ,每次编译都报错,需要手动更改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants