Closed adhikarisandil32 closed 2 weeks ago
Could you remove this folder:
F:\tutorial-practice\frontend-development\react-native\native-cli-todo-app-2\android\.gradle
and try again?
Same error here
FAILURE: Build failed with an exception.
* Where:
Settings file 'path\android\settings.gradle' line: 2
* What went wrong:
Error resolving plugin [id: 'com.facebook.react.settings']
> java.io.UncheckedIOException: Could not move temporary workspace (path\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10-d437262d-9486-4a7e-a868-29b809f9924f) to immutable location (path\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10)
Could you remove this folder:
F:\tutorial-practice\frontend-development\react-native\native-cli-todo-app-2\android\.gradle
and try again?
No Luck, sir @cortinico . The issue still persists.
However I believe I've found, let's say, a hack. If I go npm run android
on the VSCode terminal, along with the terminal it also opens command prompt automatically. The VSCode terminal shows error, but the command prompt terminal successfully runs development. Then I close the command prompt terminal. Stop the development server on the VSCode Terminal, clear the terminal and hit npm run start
and then a
. Now the app is successfully installed on my device without any error.
I create another app, and I've to do the same. And that's one tedious process.
I have the same problem. The "hack" didn't work for me.
I have the same problem. The "hack" didn't work for me.
.I'm using it on my actual real device. May be you could also try that on actual device. @Ricardo-Veiga-Lemes
I solve this problem with npm run android
In all cases I have to press "a" to run android. When I run "npm run android" it opens the Windows terminal, but there I also have to press "a" to continue and then the same error returns.
@Ricardo-Veiga-Lemes I'm using my real device. Are you using it too ? Also, why don't you delete the project and start a new completely new form the command npx @react-native-community/cli init ProjectName --directory ../DirectoryName
not on the VSCode terminal but on windows terminal. And then open up the directory containinig project files, hit npm run android
first, do as it says. Exit the windows terminal, stop the vscode terminal server, clear the console and hit npm run start
and do as it says.
As I can see, your react-native project uses 0.75.1, but mine uses 0.75.2, the latest one I guess. And if nothing works, try creating an app with expo.
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
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
don't work for me I go down until 0.73.6
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
Thanks, it worked for me. I just changed the entries in the package.json file.
Closign as this duplicates https://github.com/facebook/react-native/issues/46210
Let's keep the conversation only in one issue as it's impossible for us to help you otherwise
Description
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 run npm run start and hit a, 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.
Steps to reproduce
npx @react-native-community/cli init ProjectName --directory ../ProjectDirectory
npm run start
and Metro asks where to run, since i want to run it on android, I hita
React Native Version
0.75.2
Affected Platforms
Runtime - Android, Build - Windows
Output of
npx react-native info