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

Task :react-native-code-push:compileReleaseJavaWithJavac FAILED #2938

Closed
1 task done
thejoaov opened this issue Aug 16, 2021 · 5 comments
Closed
1 task done

Task :react-native-code-push:compileReleaseJavaWithJavac FAILED #2938

thejoaov opened this issue Aug 16, 2021 · 5 comments

Comments

@thejoaov
Copy link

thejoaov commented Aug 16, 2021

Describe the bug

Cannot build with react-native-code-push.
This only happened after I installed Detox. Before everything worked fine

the same happened here

> Task :react-native-code-push:compileReleaseJavaWithJavac FAILED
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java:14: error: package com.facebook.react.devsupport.interfaces does not exist
import com.facebook.react.devsupport.interfaces.DevSupportManager;
                                               ^
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:10: error: cannot find symbol
import com.facebook.react.ReactApplication;
                         ^
  symbol:   class ReactApplication
  location: package com.facebook.react
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:22: error: cannot find symbol
import com.facebook.react.modules.core.ChoreographerCompat;
                                      ^
  symbol:   class ChoreographerCompat
  location: package com.facebook.react.modules.core
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:24: error: cannot find symbol
import com.facebook.react.modules.core.ReactChoreographer;
                                      ^
  symbol:   class ReactChoreographer
  location: package com.facebook.react.modules.core
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java:153: error: cannot find symbol
            DevSupportManager devSupportManager = instanceManager.getDevSupportManager();
            ^
  symbol:   class DevSupportManager
  location: class CodePush
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:105: error: cannot find symbol
                latestJSBundleLoader = JSBundleLoader.createAssetLoader(getReactApplicationContext(), latestJSBundleFile, false);
                                                     ^
  symbol:   method createAssetLoader(ReactApplicationContext,String,boolean)
  location: class JSBundleLoader
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:107: error: method createFileLoader in class JSBundleLoader cannot be applied to given types;
                latestJSBundleLoader = JSBundleLoader.createFileLoader(latestJSBundleFile);
                                                     ^
  required: Context,String
  found: String
  reason: actual and formal argument lists differ in length
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:151: error: cannot find symbol
                        instanceManager.recreateReactContextInBackground();
                                       ^
  symbol:   method recreateReactContextInBackground()
  location: variable instanceManager of type ReactInstanceManager
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:203: error: cannot find symbol
        ReactApplication reactApplication = (ReactApplication) currentActivity.getApplication();
        ^
  symbol:   class ReactApplication
  location: class CodePushNativeModule
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:203: error: cannot find symbol
        ReactApplication reactApplication = (ReactApplication) currentActivity.getApplication();
                                             ^
  symbol:   class ReactApplication
  location: class CodePushNativeModule
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:242: error: package ReactChoreographer does not exist
                                    ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
                                                                                                         ^
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:242: error: package ChoreographerCompat does not exist
                                    ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
                                                                                                                                                             ^
/Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:242: error: cannot find symbol
                                    ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
                                    ^
  symbol: variable ReactChoreographer
Note: /Users/agendaedu/Desktop/enviiiar/agendaedu-mobile/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
13 errors
ReactNativeFirebase WARNING: NPM package '@react-native-firebase/auth' depends on '@react-native-firebase/app' v8.2.0 but found v8.0.0, this might cause build issues or runtime crashes.
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-code-push:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 6m 41s
384 actionable tasks: 384 executed
detox[19074] WARN:  [build.js] 

Important: 'detox build' is a convenience shortcut for calling your own build command, as provided in the config file.
Failures in this build command are not the responsibility of Detox. You are responsible for maintaining this command.

detox[19074] ERROR: [cli.js] Command failed: mkdir -p android/app/build/generated/res/react/staging android/app/build/generated/assets/react/staging && yarn react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/build/generated/assets/react/staging/index.android.bundle --assets-dest android/app/build/generated/res/react/staging && cd android && ./gradlew assembleStaging -x bundleStagingJsAndAssets -DtestBuildType=debug

error Command failed with exit code 1.

Steps To Reproduce

  • I have tested this issue on the latest Detox release and it still reproduces
  1. Add and configure code push
  2. Add and configure detox
  3. Try to build

Expected behavior

Detox Trace-Logs

Device logs (adb logcat)

Screenshots

Environment (please complete the following information):

  • Detox: 18.20.1
  • React Native: 0.64.2
  • Node: 14.16.1
  • Device: Android
  • OS: MacOS BigSur
  • Test-runner (select one): jest-circus
@d4vidi
Copy link
Collaborator

d4vidi commented Aug 29, 2021

@thejoaov could you please explain what the steps you took were, in order to add code-push to your project?
Or better yet, try to apply them over the DetoxTemplate project, by forking it?

@stale
Copy link

stale bot commented Sep 28, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

@stale stale bot added the 🏚 stale label Sep 28, 2021
@thejoaov
Copy link
Author

thejoaov commented Oct 4, 2021

Hi @d4vidi
I think @LeonardodeLima could explain better

@stale stale bot removed the 🏚 stale label Oct 4, 2021
@stale
Copy link

stale bot commented Nov 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

@stale stale bot added the 🏚 stale label Nov 3, 2021
@stale
Copy link

stale bot commented Nov 10, 2021

The issue has been closed for inactivity.

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