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

Build failed using ReactNative@0.75.2 #46304

Closed
lalithasj opened this issue Sep 2, 2024 · 12 comments
Closed

Build failed using ReactNative@0.75.2 #46304

lalithasj opened this issue Sep 2, 2024 · 12 comments

Comments

@lalithasj
Copy link

Description

Hi,
I tried using npx react-native init Client and npx @react-native-community/cli@latest init Client. Both times, the build failed.
Android Emulator and Metro are connected, but not recognizing
My package.json file:
{
"name": "Client",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"react": "^18.1.0",
"react-native": "0.75.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.75.2",
"@react-native/eslint-config": "0.75.2",
"@react-native/metro-config": "0.75.2",
"@react-native/typescript-config": "0.75.2",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.3.1",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
}

Thanks,
Lalitha

Steps to reproduce

npx @react-native-community/cli@latest init Client

React Native Version

0.75.2

Affected Platforms

Runtime - Android

Output of npx react-native info

npx react-native info
info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.22631
  CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
  Memory: 4.99 GB / 15.85 GB
Binaries:
  Node:
    version: 18.18.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 9.6.2
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "33"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 28.0.3
      - 29.0.2
      - 29.0.3
      - 34.0.0
      - 35.0.0
    System Images:
      - android-28 | Google APIs Intel x86_64 Atom
      - android-29 | Google APIs Intel x86 Atom
      - android-30 | Google APIs Intel x86 Atom
      - android-31 | Google APIs Intel x86_64 Atom
      - android-34 | ARM 64 v8a
      - android-34 | Intel x86_64 Atom
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google Play Intel x86_64 Atom
      - android-35 | Google APIs Intel x86 Atom_64
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
IDEs:
  Android Studio: Not Found
  Visual Studio: Not Found
Languages:
  Java: 17.0.8
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.1.0
    wanted: ^18.1.0
  react-native:
    installed: 0.75.2
    wanted: 0.75.2
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

npm run android --info

> Client@0.0.1 android
> react-native run-android

info A dev server is already running for this project on port 8081.
info Launching emulator...
error Failed to launch emulator. Reason: The emulator (Pixel_7_API_34) quit before it finished opening. You can try starting the emulator manually from the terminal with: C:\Users\Admin\AppData\Local\Android\Sdk/emulator/emulator @Pixel_7_API_34.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 


FAILURE: Build failed with an exception.

* Where:
Settings file 'E:\ReactNative\RNNodeAuth\Client\android\settings.gradle' line: 2

* What went wrong:
Error resolving plugin [id: 'com.facebook.react.settings']
> java.io.UncheckedIOException: Could not move temporary workspace (E:\ReactNative\RNNodeAuth\Client\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10-6fe9999e-9d02-4604-b013-3a28c39832e2) to immutable location (E:\ReactNative\RNNodeAuth\Client\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 3s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Settings file 'E:\ReactNative\RNNodeAuth\Client\android\settings.gradle' line: 2 * What went wrong: Error resolving plugin [id: 'com.facebook.react.settings'] > java.io.UncheckedIOException: Could not move temporary workspace (E:\ReactNative\RNNodeAuth\Client\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10-6fe9999e-9d02-4604-b013-3a28c39832e2) to immutable location (E:\ReactNative\RNNodeAuth\Client\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10) * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 3s.
info Run CLI with --verbose flag for more details.

Reproducer

https://github.com/lalithasj/Client/tree/main

Screenshots and Videos

No response

@harshmdr
Copy link

harshmdr commented Sep 3, 2024

same issue. I am using mac m1

@aashish-tanwar
Copy link

Hi,

I'm facing an issue with my Android build after upgrading the React Native version to 0.75.2

Screenshot 2024-09-02 at 4 59 33 PM

Help will be highly appreciated!

@klipperklip
Copy link

klipperklip commented Sep 6, 2024

Hi,

I'm facing an issue with my Android build after upgrading the React Native version to 0.75.2

Screenshot 2024-09-02 at 4 59 33 PM Help will be highly appreciated!

I have the same problems and also hope the RN team can help us with them.

@lalithasj
Copy link
Author

lalithasj commented Sep 7, 2024

Hi,
changing the npm react-native and npm @react-native-community/cli versions to previous versions is also not helpful.

Appreciate any suggestions

@dayasudhan
Copy link

i am also facing same issue Appreciate any suggestions

@piyush362
Copy link

Actually IDK but it is working when you run npm run android it will open another terminal on windows and the build fail on vs code, but if you click a on that new terminal It will create and install build, but error of metro run running. After that you just do npm run android again and it will install and run perfect.

@lalithasj
Copy link
Author

Hi @piyush362 ,
Thank you for your response. But your suggestion isn't working for me. npm run android in VS code and then a in the metro window. Then again npm run android in VS Code window not working.

@piyush362
Copy link

piyush362 commented Sep 10, 2024

Hi @piyush362 , Thank you for your response. But your suggestion isn't working for me. npm run android in VS code and then a in the metro window. Then again npm run android in VS Code window not working.

For now, you can use v0.73.* or v0.74.* for more stable perfomance

@lalithasj
Copy link
Author

lalithasj commented Sep 10, 2024

Hi @piyush362 ,

Thank you for your suggestion. Unfortunately this is also not working

npx react-native@0.73 init RNExpress3 --template react-native-template-typescript

  • creating empty folder and no files in it
  • error : npx react-native@0.73 init RNExpress3 --template react-native-template-typescript
    warn Ignoring custom template: 'react-native-template-typescript'. Starting from React Native v0.71 TypeScript is used by default.

npx @react-native-community/cli@11.4.1 init RNExpressEcomm2

npx react-native@0.73 init RNExpress1

  • This is also creating empty folder and above template error

Appreciate any suggestions

@cortinico cortinico added Platform: Windows Building on Windows. and removed Needs: Triage 🔍 labels Sep 12, 2024
@cortinico
Copy link
Contributor

@lalithasj
Copy link
Author

lalithasj commented Sep 12, 2024

Hi @cortinico,

Thank you for your suggestion.
I tried with 0.75.3

FAILURE: Build failed with an exception.
tion: Could not move temporary workspace (E:\ReactNative\TestSept12\android.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10-d2f93cd8-cdb8-49ec-a8cb-6b8dbb956526) to immutable location (E:\ReactNative\TestSept12\android.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10) * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 15s.

Appreciate any suggestions

@cortinico
Copy link
Contributor

Let's keep the conversation in #46210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants