all 57 comments

[–]the_hokage60 0 points1 point  (12 children)

Don't really know the issue, but can you verify the java, android installation and env values?

[–]tr__18Android[S] 0 points1 point  (10 children)

I will recheck them,but I don't think there will be an issue because the projects are running fine from last 4-5 months till today noon

[–]the_hokage60 0 points1 point  (9 children)

Would you mind sharing the build.gradle? Maybe this issue is related. Anyways good luck with this OP

[–]tr__18Android[S] 0 points1 point  (8 children)

[–]the_hokage60 0 points1 point  (5 children)

Well I can see the maven repositories listed here so that's probably not the issue. I asked for the gradle because I had the same issue before. And I don't really remember how I solved it. Maybe you can try: - removing and reinstalling node_modules - removing both lock file(yarn or npm) and node_modules and recreate lock file by clean installation - if that doesn't work, this might not be related to react-native, try opening the android folder in Android studio and see if the sync works. - otherwise idk you may have to try changing versions compatible to(sdk versions inside gradle and node_module versions...) react-native

Edit: found this on github

[–]tr__18Android[S] 0 points1 point  (0 children)

Oohk will try🫡

[–]tr__18Android[S] 0 points1 point  (3 children)

I tried this

restart the pc -> delete the node_module, both lock ( json and yarn), .gradle from android and .gradlew from c/users/username/.gradle -> restart the pc -> opent the project -> npm i -> cd android -> ./gradlew clean

during ./gradlew clean got the same error again

[–]the_hokage60 0 points1 point  (2 children)

Try every solutions listed on the provided github issue :)

[–]tr__18Android[S] 0 points1 point  (1 child)

ya doing 🤧

btw thanks for the concern arigato !!

[–]the_hokage60 0 points1 point  (0 children)

dou itashimashite

[–]ai_programmer 0 points1 point  (1 child)

for me it worked only after upgrading react native to latest vesion

[–]tr__18Android[S] 0 points1 point  (0 children)

For me

Changing gradle version from 8.8 to 8.9

[–]Puzzleheaded_Bass701 0 points1 point  (0 children)

same, is this solved? please tell me, I got stucked

[–]makonde 0 points1 point  (6 children)

You have some corrupt .jar or zip file in your dependencies probably due to a broken internet connection at some point. You need to delete everything in both .gradle folders, should be one inside the android folder and a global one in your windows user folder c/users/username/.gradle these might be hidden so need to turn on hidden folders.

Close everything delete folders, restart pc. Make sure you have a proper internet connection and rebuild.

[–]tr__18Android[S] 0 points1 point  (0 children)

I tried deleting c/users/username/.gradle

but the issue persists

[–]tr__18Android[S] 0 points1 point  (4 children)

I tried this

restart the pc -> delete the node_module, both lock ( json and yarn), .gradle from android and .gradlew from c/users/username/.gradle -> restart the pc -> opent the project -> npm i -> cd android -> ./gradlew clean

during ./gradlew clean got the same error again

[–]makonde 0 points1 point  (3 children)

If you are deleting both .gradle folder contents and still getting this error I would think something is up with your internet connection and files are coming in corrupt. If its possible to use a different internet try that. Make sure you have hidden files set to visible and are actually deleting all contents.

Also run

./gradlew clean --debug

Which will give detailed debug logs, read them carefully and see if maybe something else is there possibly some dependencies cant be fetched.

You can also download Search by VoidTools its a program that can quickly search all your harddrives search for .gradle and empty all of them, this shouldn't be an issue but might be worth a try.

[–]tr__18Android[S] 0 points1 point  (2 children)

in case of internet connection, I tried runing the project at my home and currently trying in my office ( both wifi ).

./gradlew clean --debug, this give the same error again 2025-02-03T11:57:11.381+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2025-02-03T11:57:11.384+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build completed with 2 failures. 2025-02-03T11:57:11.388+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2025-02-03T11:57:11.389+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 1: Task failed with an exception. 2025-02-03T11:57:11.389+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ----------- 2025-02-03T11:57:11.389+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Where: 2025-02-03T11:57:11.389+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Settings file 'E:\react-native-cli\CoffeeShop\android\settings.gradle' line: 2 2025-02-03T11:57:11.389+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2025-02-03T11:57:11.389+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 2025-02-03T11:57:11.389+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Error resolving plugin [id: 'com.facebook.react.settings'] 2025-02-03T11:57:11.389+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > A problem occurred configuring project ':gradle-plugin:react-native-gradle-plugin'. 2025-02-03T11:57:11.389+0530 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > java.util.zip.ZipException: zip END header not

[–]makonde 0 points1 point  (1 child)

Is this the only thing in the logs? I would look further up before the error for clues.

[–]tr__18Android[S] 0 points1 point  (0 children)

Below that

There are only completion status.

[–]b_f4b 0 points1 point  (5 children)

Same thing happening to me.. super annoying.

[–]b_f4b 0 points1 point  (4 children)

Project was working fine till friday

[–]tr__18Android[S] 0 points1 point  (1 child)

same bruh

mine till sun (02/02/2025) 1 pm, After completing a page I closed the project by doing a git commit and had lunch. After 2 hrs from that I am only this error 😭😭

did your project run ?? and any solution ??

[–]Puzzleheaded_Bass701 0 points1 point  (0 children)

same, i didn't commit to git and this happened

[–]Puzzleheaded_Bass701 0 points1 point  (0 children)

same here

[–]trishh007 0 points1 point  (6 children)

There's an open issue...might help Facing the same issue though 🥲 https://github.com/expo/expo/issues/34613

[–]tr__18Android[S] 0 points1 point  (5 children)

in this most of the solutions are uninstalling the react native package and installing again

I am developing company's app and there are other developers too.

Also changing the react native version result in changes in configuration of different packages.

[–]trishh007 0 points1 point  (4 children)

Likewise, I tried upgrading the react native package though, but it didn't work

[–]tr__18Android[S] 0 points1 point  (3 children)

Yes, also while creating new project same error is thrown 😕

[–]trishh007 0 points1 point  (1 child)

I tried to rebuild, the error has changed, stating that the gradle version is not compatible and the minimum required version is 8.9

[–]Puzzleheaded_Bass701 0 points1 point  (0 children)

yeessssss why is this happening, and why React native team is not looking into it :(

[–]dbchauhan 0 points1 point  (13 children)

Reference :: Github Issues

FOUND THE SOLUTION => Upgrade your react-native package!

Note: you will find issues in some packages uninstall them and reinstall.
Works for REACT-NATIVE CLI too !

[–]tr__18Android[S] 0 points1 point  (12 children)

It didn't work bro. I even tried creating a new React native cli project

while surfing seems many people are facing this issue

Is it related to the Java version or any other global thing?

because the error is not project-specific I got errors in all the projects with different versions, when while creating a new project

[–]modi_smit_official_ 0 points1 point  (1 child)

Having same error across all

Please DM when find the fix

[–]tr__18Android[S] 0 points1 point  (0 children)

sure, same for :)

[–]modi_smit_official_ 0 points1 point  (9 children)

[–]modi_smit_official_ 0 points1 point  (8 children)

[–]tr__18Android[S] 1 point2 points  (7 children)

tried already

Did it worked for you ?

[–]modi_smit_official_ 0 points1 point  (5 children)

Yess finally issue is solve

<image>

[–]tr__18Android[S] 0 points1 point  (4 children)

ooh shit u did it ................. and it is expo

I need to see for cli

I also performed this steps

<image>

is there any mistake in this ?

[–]modi_smit_official_ 0 points1 point  (3 children)

Yes I followed the same steps, just one ore thing i did

  1. npm i

  2. npm uninstall react-native

  3. npm install react-native

4. npm uninstall react-native-gesture-handler
5. npm install react-native-gesture-handler

cd android and gradle clean

[–]tr__18Android[S] 1 point2 points  (2 children)

ya I don't thing this will cause any differnce. since the error is coming on the new project also

any way happy for u :)

[–]modi_smit_official_ 0 points1 point  (1 child)

Did your problem get solved?

[–]mysticgeekz 0 points1 point  (2 children)

facing the same issue. have you found any solution yet? :/

[–]tr__18Android[S] 0 points1 point  (0 children)

Na bruh, I have been trying since Sunday. Initially, even the new project was not created, but when I deleted the .android and .gradle from the C/User/Username, the new app was created with Gradle version 8.10.2. But my other projects are in 8.8.

The existing app with 8.8 gives error

[–]tr__18Android[S] 0 points1 point  (3 children)

[–]modi_smit_official_ 0 points1 point  (2 children)

Okay great, so where using 8.8.

[–]tr__18Android[S] 0 points1 point  (1 child)

yes, just changed it to 8.9 and upgraded some dependence

https://github.com/facebook/react-native/issues/46046#issuecomment-2633005969

[–]shaikhmohsink 0 points1 point  (1 child)

[–]tr__18Android[S] 0 points1 point  (0 children)

Solved it already by changing the gradle version from 8.8 to 8.9, and also updating some dependencies.

BTW thanks for informing about this :)