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

Build failed with React Native 0.62 #1823

Closed
messense opened this issue Mar 27, 2020 · 8 comments
Closed

Build failed with React Native 0.62 #1823

messense opened this issue Mar 27, 2020 · 8 comments

Comments

@messense
Copy link

> Task :react-native-code-push:compileDebugJavaWithJavac FAILED
/Users/lusheng.lls/workspace/brm-apps/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java:157: error: cannot find symbol
                isLiveReloadEnabled = devInternalSettings.isReloadOnJSChangeEnabled();
                                                         ^
  symbol:   method isReloadOnJSChangeEnabled()
  location: variable devInternalSettings of type DevInternalSettings
Note: /Users/lusheng.lls/workspace/brm-apps/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.
1 error

Root cause: facebook/react-native@478df15#diff-2fc30127a6c6568653505923bbd3bdbb

@stulip
Copy link

stulip commented Mar 27, 2020

My solution is to change isReloadOnJSChangeEnabled to isHotModuleReplacementEnabled

node_modules / react-native-code-push / android / app / src / main / java / com / microsoft / codepush / react / CodePush.java

Compile and wait for the official website to fix it.

@KDederichs
Copy link

May I ask you actually managed to compile it?
I'm stuck on it failing configuration (see the other issue related to compiling)

@stulip
Copy link

stulip commented Mar 27, 2020

我也是今天升级到RN62的,一切顺利,并且我的RN程序还集成了Flutter(1.12.13)也是顺利升级。
I also upgraded to RN62 today. Everything went well, and my RN program also integrated Flutter (1.12.13) and was upgraded smoothly.

"react-native-code-push": "^6.1.1"

@kyle-ssg
Copy link

@astulip thanks for this, the above fixed the problem for me.

All in all I had to do the following to get this running on RN62:

settings.gradle

rootProject.name = 'boilerplate'

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app', ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')

node_modules / react-native-code-push / android / app / src / main / java / com / microsoft / codepush / react / CodePush.java

        if (instanceManager != null) {
            DevSupportManager devSupportManager = instanceManager.getDevSupportManager();
            if (devSupportManager != null) {
                DevInternalSettings devInternalSettings = (DevInternalSettings)devSupportManager.getDevSettings();
                isLiveReloadEnabled = devInternalSettings.isHotModuleReplacementEnabled();
            }
        }

@jafar-jabr
Copy link

any update ?

@lukebars
Copy link

#1829 solves this

@alexandergoncharov-zz
Copy link
Contributor

Hi all,
Thanks for reporting!

As @lukebars mentioned, #1829 solved this issue and we made new release: https://github.com/microsoft/react-native-code-push/releases/tag/v6.2.0

I'm going to close this issue for now. Please feel free to reopen it if you have any questions.

@marlti7
Copy link

marlti7 commented Dec 27, 2021

@astulip thanks for this, the above fixed the problem for me.

All in all I had to do the following to get this running on RN62:

settings.gradle

rootProject.name = 'boilerplate'

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app', ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')

node_modules / react-native-code-push / android / app / src / main / java / com / microsoft / codepush / react / CodePush.java

        if (instanceManager != null) {
            DevSupportManager devSupportManager = instanceManager.getDevSupportManager();
            if (devSupportManager != null) {
                DevInternalSettings devInternalSettings = (DevInternalSettings)devSupportManager.getDevSettings();
                isLiveReloadEnabled = devInternalSettings.isHotModuleReplacementEnabled();
            }
        }

it.s work

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

9 participants