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

[Bug]: Not building in Android for React Native 76.0 new arch enabled project. #1756

Closed
2 of 3 tasks
Gautham495 opened this issue Nov 3, 2024 · 1 comment
Closed
2 of 3 tasks

Comments

@Gautham495
Copy link

Gautham495 commented Nov 3, 2024

What happened?

Current behavior
Does not build in android for new arch.

Expected behavior
Should build properly without showing build error.

Platform
Android
React Native Version
76.0

React Native Onesignal
Latest Version.

Steps to reproduce?

1. Install a fresh new react native project at 76.0 with new arch enabled.
2. Install latest one signal version
3. Error occurs when building in android.


You can see the logs below.

What did you expect to happen?

Expected it to build properly

React Native OneSignal SDK version

5.2.5

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

/Users/gauthamvijayan/sync/node_modules/react-native-onesignal/android/src/main/java/com/onesignal/rnonesignalandroid/RNOneSignal.java:222: warning: [removal] onCatalystInstanceDestroy() in NativeModule has been deprecated and marked for removal
    public void onCatalystInstanceDestroy() {
                ^
Note: /Users/gauthamvijayan/sync/node_modules/react-native-onesignal/android/src/main/java/com/onesignal/rnonesignalandroid/RNOneSignal.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/gauthamvijayan/sync/node_modules/react-native-onesignal/android/src/main/java/com/onesignal/rnonesignalandroid/RNUtils.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 3m 1s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a
No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
Note: [2] Wrote GeneratedAppGlideModule with: [com.bumptech.glide.integration.okhttp3.OkHttpLibraryGlideModule, com.dylanvann.fastimage.FastImageOkHttpProgressGlideModule]
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/gauthamvijayan/sync/node_modules/react-native-keys/android/src/main/java/com/reactnativekeysjsi/KeysPackage.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/gauthamvijayan/sync/node_modules/react-native-mmkv/android/src/main/java/com/mrousavy/mmkv/MmkvPackage.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/gauthamvijayan/sync/node_modules/react-native-onesignal/android/src/main/java/com/onesignal/rnonesignalandroid/RNOneSignal.java:222: warning: [removal] onCatalystInstanceDestroy() in NativeModule has been deprecated and marked for removal public void onCatalystInstanceDestroy() { ^
Note: /Users/gauthamvijayan/sync/node_modules/react-native-onesignal/android/src/main/java/com/onesignal/rnonesignalandroid/RNOneSignal.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/gauthamvijayan/sync/node_modules/react-native-onesignal/android/src/main/java/com/onesignal/rnonesignalandroid/RNUtils.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details. FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':app:installDebug'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices. * Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. BUILD FAILED in 3m 1s.
info Run CLI with --verbose flag for more details.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nan-li
Copy link
Contributor

nan-li commented Nov 4, 2024

Hi @Gautham495, I don't see a OneSIgnal-related error as the log about onCatalystInstanceDestroy is a warning.

I see the error is

* What went wrong:
Execution failed for task ':app:installDebug'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices.

// ...

error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a

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

No branches or pull requests

2 participants