react-native-datetimepicker / datetimepicker

React Native date & time picker component for iOS, Android and Windows
MIT License
2.53k stars 413 forks source link

Fail on Android debug build / :react-native-community_datetimepicker:packageDebugResources FAILED #914

Closed arslanyasin closed 3 months ago

arslanyasin commented 4 months ago

Bug report

Summary

I am using AGP 8.2.1 and gradle and getting this error while compiling from the project folder ( react-native run-android ) but when i am trying to compile and run from android studio it compiles and install the app but not connecting to the metro server

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-community_datetimepicker:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':react-native-community_datetimepicker: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/arslanyasin/Library/Android/sdk/platforms/android-34/core-for-system-modules.jar.
         > Error while executing process /Users/arslanyasin/Library/Java/JavaVirtualMachines/graalvm-jdk-17.0.11/Contents/Home/bin/jlink with arguments {--module-path /Users/arslanyasin/.gradle/caches/transforms-4/9a0e9397ed607117ac65600d5fa74e17-50770bb8-3bd2-4e1f-b3fc-c9e7ec93058f/transformed/output/temp/jmod --add-modules java.base --output /Users/arslanyasin/.gradle/caches/transforms-4/9a0e9397ed607117ac65600d5fa74e17-50770bb8-3bd2-4e1f-b3fc-c9e7ec93058f/transformed/output/jdkImage --disable-plugin system-modules}

Reproducible sample code

Yarn add @react-native-community/datetimepicker

react-native run-android

tried with gradle cleam many time but no solution. the problem is with the gradle version conflict may be How to resolve this please help

Steps to reproduce

  1. Yarn add @react-native-community/datetimepicker
  2. react-native run-android

Environment info

npx react-native info output:

System:
  OS: macOS 13.6
  CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Memory: 21.15 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.5.0
    path: ~/.nvm/versions/node/v21.5.0/bin/node
  Yarn:
    version: 3.6.4
    path: /usr/local/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v21.5.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.10949950
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.1
    wanted: 0.74.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

datetimepicker version: 8.1.1

github-actions[bot] commented 3 months ago

:wave: @arslanyasin, sorry you're having an issue. This issue is being closed because it does not provide all information required by the issue template. As the issue template explains, we require that you provide a runnable example that reproduces your issue and your environment information. This means you need to provide a code snippet that we can copy-paste into an empty project and see the error ourselves, or provide a git repository with the issue. The reason is that maintainers do not have time to try reproduce bugs themselves. Please try to minimize the superfluous code and focus only on reproducing the bug. Please create a new issue with this and we'll be happy to review it!