facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.52k stars 24.37k forks source link

Incompatible magic value 0 in class file build_9bava4o0y7n281b3dadyxgnzj #46687

Closed AlphaebarcodeDevelopers closed 1 month ago

AlphaebarcodeDevelopers commented 2 months ago

Description

"dependencies": { "@coffeebeanslabs/react-native-inviewport": "^0.2.0", "@notifee/react-native": "^9.0.2", "@ptomasroos/react-native-multi-slider": "^2.2.2", "@react-native-async-storage/async-storage": "^1.23.1", "@react-native-community/cli-platform-android": "^13.6.8", "@react-native-community/datetimepicker": "^8.0.1", "@react-native-firebase/app": "^20.0.0", "@react-native-firebase/crashlytics": "^20.0.0", "@react-native-firebase/messaging": "^20.4.0", "@react-navigation/bottom-tabs": "^6.5.20", "@react-navigation/drawer": "^6.6.15", "@react-navigation/native": "^6.1.17", "@react-navigation/stack": "^6.3.29", "@types/prop-types": "^15.7.12", "@types/react-native-countdown-component": "^2.7.4", "@types/react-native-snap-carousel": "^3.8.11", "@types/react-native-sqlite-storage": "^6.0.5", "accordion-collapse-react-native": "^1.1.1", "deprecated-react-native-prop-types": "^5.0.0", "lottie-react-native": "^5.1.6", "moment": "^2.30.1", "numeral": "^2.0.6", "react": "18.3.1", "react-native": "0.75.3", "react-native-blob-util": "^0.19.9", "react-native-countdown-component": "^2.7.1", "react-native-detector": "^0.2.3", "react-native-device-info": "^11.1.0", "react-native-document-picker": "^9.3.0", "react-native-dropdown-picker": "^5.4.6", "react-native-fast-image": "^8.6.3", "react-native-file-viewer": "^2.1.5", "react-native-fs": "^2.20.0", "react-native-gesture-bottom-sheet": "^1.1.0", "react-native-gesture-handler": "^2.19.0", "react-native-image-pan-zoom": "^2.1.12", "react-native-image-picker": "^7.1.2", "react-native-image-slider": "^2.0.3", "react-native-image-zoom-viewer": "^3.0.1", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-modal": "^13.0.1", "react-native-orientation": "^3.1.3", "react-native-otp-textinput": "^1.1.5", "react-native-otp-verify": "^1.1.8", "react-native-paper": "^5.12.3", "react-native-pdf": "^6.7.5", "react-native-permissions": "^4.1.5", "react-native-progress-circle": "^2.1.0", "react-native-reanimated": "^3.15.1", "react-native-root-toast": "^3.6.0", "react-native-safe-area-context": "^4.10.3", "react-native-screens": "^3.34.0", "react-native-segmented-control-tab": "^4.0.0", "react-native-share": "^10.2.1", "react-native-simple-bottom-sheet": "^1.0.4", "react-native-simple-modal": "^9.0.1", "react-native-simple-toast": "^3.3.1", "react-native-step-indicator": "^1.0.3", "react-native-svg": "^15.3.0", "react-native-swiper": "^1.6.0", "react-native-vector-icons": "^10.1.0", "react-native-video": "^6.1.2", "react-native-video-controls": "^2.8.1", "react-native-view-overflow": "^0.0.5", "react-native-vision-camera": "^4.3.2", "react-native-webview": "^13.10.2", "rn-textinputlayout": "^1.0.5" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "0.75.3", "@react-native/eslint-config": "0.75.3", "@react-native/metro-config": "0.75.3", "@react-native/typescript-config": "0.75.3", "@types/react": "^18.2.6", "@types/react-native-vector-icons": "^6.4.18", "@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" }

Steps to reproduce

Just install NPM and Run then Showing Error

If i am Open in android Studio Same error show but when i am comment autolinkLibrariesWithApp() and pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") } plugins { id("com.facebook.react.settings") } extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }

Then Successfully Sync

React Native Version

0.75.3

Affected Platforms

Runtime - Android

Output of npx react-native info

OS: Windows 10 10.0.17134
  CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700F
  Memory: 4.49 GB / 15.84 GB
Binaries:
  Node:
    version: 20.17.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 10.8.2
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-241.19072.14.2412.12360217
  Visual Studio: Not Found
Languages:
  Java: 17.0.12
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.3
    wanted: 0.75.3
  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

Incompatible magic value 0 in class file build_bfd04fp06u08y9d7vj9k9ik7s

Reproducer

No response

Screenshots and Videos

Capture

react-native-bot commented 2 months ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
react-native-bot commented 2 months ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
cortinico commented 2 months ago

Are you able to build from the command line with yarn android?

AlphaebarcodeDevelopers commented 2 months ago

Are you able to build from the command line with yarn android?

no, i am use CLI.

cortinico commented 2 months ago

Are you able to build from the command line with yarn android?

no, i am use CLI.

Sorry but I don't understand your answer.

Can you run yarn android on the terminal and print the output of what you see on console?

AlphaebarcodeDevelopers commented 1 month ago

Are you able to build from the command line with yarn android?

no, i am use CLI.

Sorry but I don't understand your answer.

Can you run yarn android on the terminal and print the output of what you see on console?

JewelDeal2024@0.0.1 android react-native run-android

info Installing the app... 13 actionable tasks: 3 executed, 10 up-to-date

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/cl i-doctor/README.md#doctor

FAILURE: Build failed with an exception.

BUILD FAILED in 1s error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. What went wrong: Incompatible magic value 0 in class file build_bfd04fp06u08y9d7vj9k9ik7s 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.gr adle.org. BUILD FAILED in 1s.

cortinico commented 1 month ago

The issue is related to the version of Java you're using: https://stackoverflow.com/questions/15748155/incompatible-magic-value-0

Sadly I can't help you further as this is a problem with your local environment. My suggestion is to try to reinstall the Java JDK as described in this page: https://reactnative.dev/docs/set-up-your-environment