Open adhikarisandil32 opened 3 weeks ago
facing same issue
facing same issue
@rghanks
I've found a trick though. hit npm run android
, let it do its job all the way. Now exit the terminal, clear the console and then again hit npm run start
. Work for me.
facing same issue
@rghanks
I've found a trick though. hit
npm run android
, let it do its job all the way. Now exit the terminal, clear the console and then again hitnpm run start
. Work for me.
this is working for me also
+1 οΌI tried switching different gradle versions but it didn't work.
facing same issue
@rghanks
I've found a trick though. hit
npm run android
, let it do its job all the way. Now exit the terminal, clear the console and then again hitnpm run start
. Work for me.
That's work for me! Thanks alot!!!!πππ
Roll back versions: 0.75.2 to 0.75.1
@react-native/gradle-plugin react-native @react-native/babel-preset @react-native/eslint-config @react-native/metro-config @react-native/typescript-config
*Don't run npm/yarn fix, it updates without permission and becomes incompatible
facing same issue
@rghanks
I've found a trick though. hit
npm run android
, let it do its job all the way. Now exit the terminal, clear the console and then again hitnpm run start
. Work for me.
Don't work for me π
@adhikarisandil32, thanks bro , i am facing same issue and it's work for me.
None of the proposed solutions seem to be working.
.gradle
and build
directories.It always gets stuck at the same spot with the same error.
@Agent009 may be downgrade a version not on the same app but create a completely new project using npx @react-native-community/cli init ProjectName --version=0.74
. just give it a try
Downgrading to RN 0.74.5
and Gradle 8.5
solves the issue.
Wonder how the new release has been working for other folks. May just be an issue with those with simulated devices running on emulators?
Downgrading to RN
0.74.5
and Gradle8.5
solves the issue. Wonder how the new release has been working for other folks. May just be an issue with those with simulated devices running on emulators?
@Agent009 I use it on real actual device and I face the same issue. I don't know. Nobody seems to be working on it. And I don't know react native enough to work on it. I don't know how to direct contributers to this issue.
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
Transferred to facebook/react-native
as this isnβt Metro related and I canβt help directly. It looks like it might be specific to the community CLI but clearly itβs affecting quite a few people. CC @cortinico
still can't find a fix
Facing same issue
Downgrading to RN
0.74.5
and Gradle8.5
solves the issue. Wonder how the new release has been working for other folks. May just be an issue with those with simulated devices running on emulators?@Agent009 I use it on real actual device and I face the same issue. I don't know. Nobody seems to be working on it. And I don't know react native enough to work on it. I don't know how to direct contributers to this issue.
I have the same versions but still getting the error.
i was facing the same issue what i just did to solve is
cd android
then
gradlew
clean or ./gradlew clean
then
gradlew
build or ./gradlew build
whatever works for you give it a try
then run your project
Due to a various of random comments, it's extremely hard for us to understand what happened here.
Please refrain from commenting "same issue" as that creates only unnecessary noise
As far as I understood:
If that is NOT the case for you -> Open another issue and do not comment here.
I've sharing some steps that could (hopefully help till we try to identify what's the issue):
@react-native/gradle-plugin
specified in your package.json. If you have it, please remove it.yarn why @react-native/gradle-plugin
that the output is:
$ yarn why @react-native/gradle-plugin
ββ react-native@npm:0.75.1
β ββ @react-native/gradle-plugin@npm:0.75.1 (via npm:0.75.1)
β
ββ react-native@npm:0.75.1 [473c9]
ββ @react-native/gradle-plugin@npm:0.75.1 (via npm:0.75.1)
cd android && ./gradlew --stop
.gradle
folder with cd android && rm -rf .gradle/ && rm -rf ~/.gradle/caches
android/gradle/wrapper/gradle-wrapper.properties
:distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Please report back if this solves the issue @Agent009
(Related to https://github.com/gradle/gradle/issues/27844)
Due to a various of random comments, it's extremely hard for us to understand what happened here.
Please refrain from commenting "same issue" as that creates only unnecessary noise
As far as I understood:
- The issue is happening only on Windows
- The issue is happening only on React Native 0.75.x
If that is NOT the case for you -> Open another issue and do not comment here.
I've sharing some steps that could (hopefully help till we try to identify what's the issue):
- Make sure you don't have a version of
@react-native/gradle-plugin
specified in your package.json. If you have it, please remove it.- Check with
yarn why @react-native/gradle-plugin
that the output is:$ yarn why @react-native/gradle-plugin ββ react-native@npm:0.75.1 β ββ @react-native/gradle-plugin@npm:0.75.1 (via npm:0.75.1) β ββ react-native@npm:0.75.1 [473c9] ββ @react-native/gradle-plugin@npm:0.75.1 (via npm:0.75.1)
- Kill all the Gradle daemons with
cd android && ./gradlew --stop
- Remove the
.gradle
folder withcd android && rm -rf .gradle/ && rm -rf ~/.gradle/caches
- Attemp to downgrade to Gradle 8.7 by changing this file
android/gradle/wrapper/gradle-wrapper.properties
:distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
- Attempt to upgrade to Gradle 8.10 by editing the same file.
Please report back if this solves the issue @Agent009
Hi cortinico, I tried your suggestions step by step but the problem persists...
I'm so confused because yesterday I created a new proyect with 0.75.2 but it didn't run with 'npm run andoid' ( 'com.facebook.react.settings' error) so I changed it version to 0.75.1, after this, the project worked.
Today I tried to create other project following the previous 'hack' but 'com.facebook.react.settings' error is showing again.
Hi @MDavidMR can you try to run gradlew clean
and see if it resets the state of the machine?
If you keep 0.75.2 and downgrade gradle to 8.7 as shown by @cortinico above, is the problem fixed?
Not working with RN 0.75.1 as well.
Hi @MDavidMR can you try to run
gradlew clean
and see if it resets the state of the machine? If you keep 0.75.2 and downgrade gradle to 8.7 as shown by @cortinico above, is the problem fixed?
yes it work for me i just downgraded gradle, deleted app/buld folder and then try to clean gradle. its done
so it is due to https://github.com/facebook/react-native/issues/46210#issuecomment-2315211671 as Nicola pointed out. We can try to downgrade gradle and wait for 8.9 to come out with a fix. @blakef
cd android ./gradlew clean ./gradlew --stop Then, go back to the root directory of your project and run: npx react-native run-android
I did this and it is working for me. You don't have to downgrade gradle with this method.
cd android ./gradlew clean ./gradlew --stop Then, go back to the root directory of your project and run: npx react-native run-android
I did this and it is working for me. You don't have to downgrade gradle with this method.
I followed this, and working fine for me. Thanks dear
Downgrading to RN
0.74.5
and Gradle8.5
solves the issue. Wonder how the new release has been working for other folks. May just be an issue with those with simulated devices running on emulators?
how did you downgrade react native?
@Renmsd don't do it, let's try first to run ./gradlew clean && ./gradlew --stop
and see if it fixes
./gradlew clean && ./gradlew --stop
neglect that the error msg has changed (dont know why) but there is no such file with the name "./gradlew " @cipolleschi
Hi @MDavidMR can you try to run
gradlew clean
and see if it resets the state of the machine? If you keep 0.75.2 and downgrade gradle to 8.7 as shown by @cortinico above, is the problem fixed?
Finally a working solution, no need to downgrade Gradle to 8.7. I'm just starting out with React-Native development and I was finding it very frustrating not being able to run a project immediately after creating it.
I also executed the command suggested by @projectninjatech : ./gradlew --stop
Thank you very much
@Renmsd you have it right above the settings file....
You need to run ./gradlew
from the android folder:
cd <path-to-your-project>\android
./gradlew clean
./gradlew --stop
perhaps on windows the command is slightly different (perhaps it is ./gradlew.bat
?), but it's there
2. yarn why @react-native/gradle-plugin
Hi,
I tried both gradle 8.7 as well as 8.10 following your steps:
android/.gradle
, android/build
and ~/.gradle/caches
Gradle 8.7 gets stuck at the same point when running ./gradlew clean
, stopping at this point in the gradle daemon output log:
2024-08-31T12:32:59.128+0100 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=11009b0a-f51f-48fd-abb3-36db1a89378b,javaHome=C:\Program Files\Java\jdk-21,daemonRegistryDir=C:\Users\user\.gradle\daemon,pid=28388,idleTimeout=10800000,priority=NORMAL,applyInstrumentationAgent=true,daemonOpts=-XX:MaxMetaspaceSize=512m,--add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx2048m,-Dfile.encoding=UTF-8,-Duser.country=GB,-Duser.language=en,-Duser.variant]
Running npm run android
ends with the same error as before:
Error resolving plugin [id: 'com.facebook.react.settings']
> java.io.UncheckedIOException: Could not move temporary workspace (C:\project\android\.gradle\8.7\dependencies-accessors\569c8b26
1a8a714d7731d5f568e0e5c05babae10-19d4b8ef-c0fc-408d-b528-17bd9053d50c) to immutable location (C:\project\android\.gradle\8.7\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10)
and gradle 8.10 errors with the following:
e: file:///project/node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/build.gradle.kts:10:49: Unresolved reference: serviceOf
e: file:///project/node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/build.gradle.kts:58:11: Unresolved reference: serviceOf
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'C:\project\node_modules\@react-native\gradle-plugin\react-native-gradle-plugin\build.gradle.kts' line: 10
* What went wrong:
Script compilation errors:
Line 10: import org.gradle.configurationcache.extensions.serviceOf
^ Unresolved reference: serviceOf
Line 58: serviceOf<ModuleRegistry>()
^ Unresolved reference: serviceOf
When I downgraded the yarn version to 1.22, it worked
FAILURE: Build failed with an exception. * Where: Settings file 'F:\tutorial-practice\frontend-development\react-native\native-cli-todo-app-2\android\settings.gradle' line: 2 * What went wrong: Error resolving plugin [id: 'com.facebook.react.settings'] > java.io.UncheckedIOException: Could not move temporary workspace (F:\tutorial-practice\frontend-development\react-native\native-cli-todo-app-2\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10-29ae1a11-17a6-474d-825c-7114fe1603d2) to immutable location (F:\tutorial-practice\frontend-development\react-native\native-cli-todo-app-2\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10)
This is the full error. The command I've used to create the project is
npx @react-native-community/cli init TodoApp2 --directory ./native-cli-todo-app-2
. The projects is created successfully. After I runnpm run start
and hita
, for android, build fails showing the above error. Another project which uses 0.74.3 is working just fine. Creating new project automatically uses 0.75.2 version which is fine, but it shows the error while building because of which development server doesn't start.
didn't work for Anyone can share other suggestions.
in Android folder I deleted .gradel
and then ran these two lines rd /s /q .gradle
and gradlew clean
and it worked ( windows) I used Gardle 8.7
I'm also facing this issue but in Mac with m1 chip. I used pnpm to install dependencies. When I checked node_modules/@react-native
folder I couldn't find gradle-plugin
inside it. so I installed it pnpm add @react-native/gradle-plugin
and the issue went away.
note that for some reason also @react-native-community/cli
needs to be installed
I was also getting the same error got the fix after installing node_modules / setup of react native project close your terminal and in new terminal then run
npm run android --clear-cache
Delete the ./gradle folder in C drive , then hit the commands again, it usually happens due to difference in gradle versions ( java versions)
still happen to me. Please help I was try
cd android && ./gradlew clean && ./gradlew --stop
but it still show error
Where: Settings file 'D:\DAT\PoultryApps\android\settings.gradle' line: 2 * What went wrong: Error resolving plugin [id: 'com.facebook.react.settings'] > java.io.UncheckedIOException: Could not move temporary workspace
Edit: Some time it success some time it error so terrible
Due to a various of random comments, it's extremely hard for us to understand what happened here.
Please refrain from commenting "same issue" as that creates only unnecessary noise
As far as I understood:
- The issue is happening only on Windows
- The issue is happening only on React Native 0.75.x
If that is NOT the case for you -> Open another issue and do not comment here.
I've sharing some steps that could (hopefully help till we try to identify what's the issue):
- Make sure you don't have a version of
@react-native/gradle-plugin
specified in your package.json. If you have it, please remove it.- Check with
yarn why @react-native/gradle-plugin
that the output is:$ yarn why @react-native/gradle-plugin ββ react-native@npm:0.75.1 β ββ @react-native/gradle-plugin@npm:0.75.1 (via npm:0.75.1) β ββ react-native@npm:0.75.1 [473c9] ββ @react-native/gradle-plugin@npm:0.75.1 (via npm:0.75.1)
- Kill all the Gradle daemons with
cd android && ./gradlew --stop
- Remove the
.gradle
folder withcd android && rm -rf .gradle/ && rm -rf ~/.gradle/caches
- Attemp to downgrade to Gradle 8.7 by changing this file
android/gradle/wrapper/gradle-wrapper.properties
:distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
- Attempt to upgrade to Gradle 8.10 by editing the same file.
Please report back if this solves the issue @Agent009
tnx bro save my day
facing same issue
@rghanks
I've found a trick though. hit
npm run android
, let it do its job all the way. Now exit the terminal, clear the console and then again hitnpm run start
. Work for me.
Well, It is Working for me also. i have been finding solution , for this problem . Thank you @rghanks
I have tried several things, I managed to work with βreact-native: β0.75.2β and /gradle-8.8-all.zip
The order is important: 1.- Create the project -> npx @react-native-community/cli@latest init AwesomeProject 2.- If we have the virtual android we must close it. 3.- click on start virtual android(I use android estudio) 4.- finally -> npm run android
This method works for me.
Close Everything. Set Java Home To Java 17 npx @react-native-community/cli@latest init AwesomeProject npx react-native run-android
and all errors gone!
I was upgrading from 0.74.2 to 0.75.2 and got the same error on Android, here is what worked for me (using gradle-8.8-all.zip):
Hope this will be helpful
I was upgrading from 0.74.2 to 0.75.2 and got the same error on Android, here is what worked for me (using gradle-8.8-all.zip):
- remove node_modules, yarn.lock and android/.gradle
- yarn install
- cd android && ./gradlew --stop
- ./gradlew clean
- npx react-native start --reset-cache in the root of the project
Hope this will be helpful
It's work, thanks
React native 0.75.1
jdk 17
gradle 8.7
Windows 11
npm run start
Error resolving plugin [id: 'com.facebook.react.settings'] , then not close emulador and
npm run android
work
so weird
Hey all, I've just tried to create a new project on 0.75.3 on Windows and I was able to successfully build with my machine. I also noticed several users in this thread managed to unblock themselves.
This issue seems to be related to Gradle > 8.6 versions and a new execution model which is not Windows-friendly (specifically if you have an Antivirus).
We'll keep you updated if we have an official workaround other than the one we already shared here: https://github.com/facebook/react-native/issues/46210#issuecomment-2315210922
IMPORTANT: The latest official update on this issue is here https://github.com/facebook/react-native/issues/46210#issuecomment-2346835978
This is the full error. The command I've used to create the project is
npx @react-native-community/cli init TodoApp2 --directory ./native-cli-todo-app-2
. The projects is created successfully. After I runnpm run start
and hita
, for android, build fails showing the above error. Another project which uses 0.74.3 is working just fine. Creating new project automatically uses 0.75.2 version which is fine, but it shows the error while building because of which development server doesn't start.