react-native-code-push
react-native-code-push copied to clipboard
"No signature of method: java.util.ArrayList.get()" after upgrading react-native-code-push from 7.0.5 to 8.0.1
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Steps to Reproduce
1.upgrade react-native-code-push from 7.0.5 to 8.0.1 2. 3.
Expected Behavior
What you expected to happen? npx react-native run-android launches without error after upgrade
Actual Behavior
What actually happens?
1: Task failed with an exception.
-----------
* Where:
Script '/Users/macair/Documents/code/js/xyz_app6/node_modules/react-native-code-push/android/codepush.gradle' line: 6
* What went wrong:
A problem occurred evaluating script.
> No signature of method: java.util.ArrayList.get() is applicable for argument types: () values: []
Possible solutions: get(int), get(int), set(int, java.lang.Object), set(int, java.lang.Object), grep(), grep()
Reproducible Demo
- Download https://github.com/microsoft/react-native-code-push/archive/master.zip and unzip. From
Examples
folder runnode create-app.js appName [email protected] [email protected]
command to generate plain CodePushified React Native app. Please see description on top ofcreate-app.js
file content if needed - If you can't reproduce the bug on it, provide us as much info as possible about your project
Environment
- react-native-code-push version: 8.0.1
- react-native version: 0.70
- iOS/Android/Windows version: MacOS Monterey
- Does this reproduce on a debug build or release build? NO
- Does this reproduce on a simulator, or only on a physical device? simulator
(The more info the faster we will be able to address it!)
Up, I'm facing the same issue even though I already follow the exact setup from this documentation https://learn.microsoft.com/en-us/appcenter/distribution/codepush/rn-get-started
I had the same issue. Your versions of react-native and the library seem to be incompatible.
Try react-native-code-push
v7.0+ for react native v0.65-v0.70
https://github.com/microsoft/react-native-code-push#supported-react-native-platforms
Might be related to https://github.com/microsoft/react-native-code-push/issues/2521.
@emclab , @tommycp96 , would it be possible for you to upgrade RN to 0.71?
Hi @DmitriyKirakosyan thanks for coming back, we will try to upgrade and let you know if we still facing this issue.
@tommycp96 , have you tried to upgrade yet? Just a gentle ping.
I'm facing the same issue !
@tommycp96 , have you tried to upgrade yet? Just a gentle ping.
Hi @DmitriyKirakosyan we still in progress and found an issue for our android app, will keep you posted if we find any issue related to CodePush library. Thanks for checking btw, appreciate it.
I'm facing the same issue !
i just downgrade codePush to 7.0.4 and its work fine
I am still having a same issue...Any solution?
Facing the same issue
same issue, any solution yet?
Hi all 👋
I solved this issue by making the following change in the node_modules/react-native-code-push/android/codepush.gradle
file:
// Broken 💥
def debuggableVariants = config.debuggableVariants.get() ?: ['debug']
// Fixed ✅
def debuggableVariants = config.debuggableVariants ?: ['debug']
For managing alterations to npm dependencies that I make locally, I rely on patch-package. Hope this helps! 🚀
@itsabk @rodrigodiasf1984 @bonesyblue Could you please check if this fix works for you? Also, could you please confirm what this issue still persist on latest version (8.2.1)?
FYI the info still persists on v8.2.1 @MikhailSuendukov ; as a matter of fact I just created an issue on it (which I will close now that I found this one)
although I'm on RN0.69.12 I thought of upgrading code push to latest since it is currently unusable by creating some invalid hook call out of nowhere when getting an update from it (also created an issue on that that got no reply in spite of making it unusable :/)
If you're using expo make sure
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
is in the gradle file at /android/app/build.gradle
(not the /android/build.gradle
file)
Hi guys,
Facing the same issue on 8.2.1
, RN 0.73.2
, could anyone fix this temporarily using a patch ?
hello I'm trying to use Code Push v8.2.2 with React Native v0.74.1, which was recently updated, but the same issue is occurring. This issue is already closed, but I don't see a clear solution, so I'm writing a comment like this.🥲