Skip to content

EAS build errors with react-native-datetimepicker #79

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

Closed
3 tasks done
BenGroot opened this issue May 14, 2025 · 6 comments
Closed
3 tasks done

EAS build errors with react-native-datetimepicker #79

BenGroot opened this issue May 14, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@BenGroot
Copy link

Before submitting a new issue

  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.

Bug summary

A duplicate AppTheme is created in style.xml on Android when using react-native-datetimepicker with custom colors in combination with this package. This causes EAS build to fail.

Library version

1.6.0

Environment info

System:
  OS: macOS 15.0.1
  CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Memory: 5.33 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.3.0
    path: ~/.nvm/versions/node/v23.3.0/bin/node
  Yarn: Not Found
  npm:
    version: 10.9.0
    path: ~/.nvm/versions/node/v23.3.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.24978.46.2431.13208083
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 21.0.5
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 18.0.0
    wanted: latest
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.79.2
    wanted: 0.79.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Steps to reproduce

  1. Set a custom color for react-native-datetimepicker this way: https://github.com/react-native-datetimepicker/datetimepicker/blob/master/docs/android-styling.md

  2. That creates an AppTheme in the style.xml.

  3. Correct the theme for edge-to-edge support using: https://github.com/zoontek/react-native-edge-to-edge?tab=readme-ov-file#expo

  4. Which also results in an AppTheme being created.

  5. Build the combination and see the error

Reproducible sample code

I think it is already clear what the issue is by the explanation provided.
@BenGroot BenGroot added the bug Something isn't working label May 14, 2025
@zoontek
Copy link
Owner

zoontek commented May 14, 2025

Fixed a long time ago. Just update Expo (even in latest v52)

If another AppTheme is still created, the issue is in rn-datepicker

@zoontek
Copy link
Owner

zoontek commented May 14, 2025

Update: Issue is here: https://github.com/react-native-datetimepicker/datetimepicker/blob/4865e33a14e8faef65f4c83173b6a2223e53d5a3/plugin/src/withDateTimePickerStyles.ts#L87

This function is deprecated in Expo. They should use getAppThemeGroup

expo/expo#30797

Feel free to open a PR on their repo.

@BenGroot
Copy link
Author

Thank you. I'm on v53. Could it be that in my case they are overwriting after edge-to-edge one is created?

@zoontek
Copy link
Owner

zoontek commented May 14, 2025

@BenGroot I published the fix to apply in react-native-datepicker above.

@zoontek zoontek closed this as completed May 14, 2025
@BenGroot
Copy link
Author

BenGroot commented May 14, 2025

I'll look further into it. Thanks for the amazingly quick reply.

@BenGroot
Copy link
Author

Reported at react-native-datetimepicker:
react-native-datetimepicker/datetimepicker#975

Also included a workaround for in the meantime.

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

2 participants