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

Android Studio build fails #1149

Open
1 of 5 tasks
saeid-elio opened this issue Oct 8, 2024 · 0 comments
Open
1 of 5 tasks

Android Studio build fails #1149

saeid-elio opened this issue Oct 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@saeid-elio
Copy link

saeid-elio commented Oct 8, 2024

What happened?

I can run my react native project in terminal via npm run android, but if I try to build it in Android Studio Ladybug (Android 15) on macOS 15.0 I get this error:

2: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-async-storage_async-storage:compileDebugJavaWithJavac'.

Could not resolve all files for configuration ':react-native-async-storage_async-storage:androidJdkImage'.
Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: /Users/sm/Library/Android/sdk/platforms/android-34/core-for-system-modules.jar.
> Error while executing process /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/jlink with arguments {--module-path /Users/sm/.gradle/caches/transforms-3/d83a989e8404276f65be3e4101087425/transformed/output/temp/jmod --add-modules java.base --output /Users/sm/.gradle/caches/transforms-3/d83a989e8404276f65be3e4101087425/transformed/output/jdkImage --disable-plugin system-modules}

My package.json dependencies:

  "dependencies": {
    "@react-native-async-storage/async-storage": "^2.0.0",
    "@react-native-community/checkbox": "^0.5.17",
    "@react-navigation/native": "^6.1.18",
    "@react-navigation/native-stack": "^6.4.1",
    "@reduxjs/toolkit": "^2.2.2",
    "fs-extra": "^11.2.0",
    "react": "18.2.0",
    "react-devtools": "^4.27.2",
    "react-native": "0.73.6",
    "react-native-input-select": "^1.3.6",
    "react-native-safe-area-context": "^4.11.0",
    "react-native-screens": "^3.34.0",
    "react-native-uuid": "^2.0.2",
    "react-native-webview": "^13.12.2",
    "react-redux": "^9.1.0"
  },

Version

2.0.0

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

System:
  OS: macOS 15.0
  CPU: (12) arm64 Apple M3 Pro
  Memory: 92.63 MB / 18.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.17.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 10.8.2
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.09.23.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.21829.142.2421.12409432
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 3.3.5
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: 0.73.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Steps to Reproduce

Start a build in Android Studio

@saeid-elio saeid-elio added the bug Something isn't working label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant