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

upgrading from react-native 0.50.4 to 0.60.0 using rn-diff-purge (build failed with: Could not find method enabled() for arguments [[]] on task ':app:bundleDebugJsAndAssets' of type org.gradle.api.tasks.Exec.)) #25542

Closed
ghost opened this issue Jul 8, 2019 · 11 comments
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@ghost
Copy link

ghost commented Jul 8, 2019

Could not find method enabled() for arguments [[]] on task ':app:bundleDebugJsAndAssets' of type org.gradle.api.tasks.Exec.

React Native version:0.60.0

System:
OS: macOS 10.14.2
CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 18.51 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.9.4 - /usr/local/bin/node
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.3, macOS 10.13, tvOS 11.3, watchOS 4.3
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.3, 26.0.3, 27.0.0, 27.0.3, 28.0.0, 28.0.2, 28.0.3
System Images: android-23 | Android TV ARM EABI v7a, android-23 | Android TV Intel x86 Atom, android-23 | Android Wear ARM EABI v7a, android-23 | Android Wear Intel x86 Atom, android-23 | Intel x86 Atom, android-23 | Intel x86 Atom_64, android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64, android-24 | Android TV Intel x86 Atom, android-24 | ARM 64 v8a, android-24 | ARM EABI v7a, android-24 | Intel x86 Atom, android-24 | Intel x86 Atom_64, android-24 | Google APIs ARM 64 v8a, android-24 | Google APIs ARM EABI v7a, android-24 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom_64, android-24 | Google Play Intel x86 Atom, android-25 | Android TV Intel x86 Atom, android-25 | China version of Android Wear ARM EABI v7a, android-25 | China version of Android Wear Intel x86 Atom, android-25 | Android Wear ARM EABI v7a, android-25 | Android Wear Intel x86 Atom, android-25 | Intel x86 Atom, android-25 | Intel x86 Atom_64, android-25 | Google APIs ARM 64 v8a, android-25 | Google APIs ARM EABI v7a, android-25 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom_64, android-25 | Google Play Intel x86 Atom, android-26 | Android TV Intel x86 Atom, android-26 | China version of Android Wear Intel x86 Atom, android-26 | Android Wear Intel x86 Atom, android-26 | Intel x86 Atom, android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Android TV Intel x86 Atom, android-27 | Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Android TV Intel x86 Atom, android-28 | China version of Wear OS Intel x86 Atom, android-28 | Wear OS Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 9.3/9E145 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.0 => 0.60.0
npmGlobalPackages:
react-native-cli: 1.0.0
react-native-firebase: 4.1.0
react-native-git-upgrade: 0.2.7
react-native-rename: 2.4.1
-->

Steps To Reproduce

1.upgrade from react-native 0.50.4 to 0.60.0

@ghost ghost added the Bug label Jul 8, 2019
@react-native-bot react-native-bot added the Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. label Jul 8, 2019
@calypsow777
Copy link

Have the same problem upgrading from 0.59.10

@boliveira
Copy link

Same problem here, upgraded from 0.59.6. Any help?

@boliveira
Copy link

Further info: After analysing the react.gradle code, it seems that if you define in your build.gradle a project.ext.react property, it will work. A new project with react-native init has this property set but if you comment it, the same error happens.

@ganico
Copy link

ganico commented Jul 11, 2019

Further info: After analysing the react.gradle code, it seems that if you define in your build.gradle a project.ext.react property, it will work. A new project with react-native init has this property set but if you comment it, the same error happens.

may ask how exactly did you fix the issue??

@boliveira
Copy link

@ganico , I just inserted in android/app/build.gradle the following code:

project.ext.react = [ entryFile: "index.android.js" ]

Put it before apply from: "../../node_modules/react-native/react.gradle" and it will work.

@ganico
Copy link

ganico commented Jul 11, 2019

@ganico , I just inserted in android/app/build.gradle the following code:

project.ext.react = [ entryFile: "index.android.js" ]

Put it before apply from: "../../node_modules/react-native/react.gradle" and it will work.

yeah... i did it correctly but I'm still encountering another issue bwohoho!! anyways still thanks for the response :)

@tapz
Copy link

tapz commented Aug 15, 2019

Worked for me too. RN team should keep an old version and try upgrading themselves when releasing a new version. Then they would see the errors everybody else is seeing and probably could add some documentation.

@louzada01
Copy link

@ganico , I just inserted in android/app/build.gradle the following code:
project.ext.react = [ entryFile: "index.android.js" ]
Put it before apply from: "../../node_modules/react-native/react.gradle" and it will work.

yeah... i did it correctly but I'm still encountering another issue bwohoho!! anyways still thanks for the response :)

I have the same problem.

@MutableLoss
Copy link

I ran into this exact error because react.gradle was included twice.

It looks like the line missing for others, wasn't touched in the 0.60.0 build. If the issue was due to using the automatic upgrade tool (usually is), it may be worth looking into updating your upgrade workflow to include verifying the changes, or making changes manually with help from the Upgrade Helper, at least with major releases.

@stale
Copy link

stale bot commented Jun 13, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 13, 2020
@stale
Copy link

stale bot commented Jun 20, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Jun 20, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests

7 participants