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 build issue moving to 0.76.2 #47727

Open
ajouve opened this issue Nov 19, 2024 · 3 comments
Open

Android build issue moving to 0.76.2 #47727

ajouve opened this issue Nov 19, 2024 · 3 comments
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications.

Comments

@ajouve
Copy link

ajouve commented Nov 19, 2024

Description

I had an error moving to RN 0.76.2 following this helper https://react-native-community.github.io/upgrade-helper/?from=0.74.3&to=0.76.2

I resolved this issue keeping android.enableJetifier=true but this should not be a good practice

Steps to reproduce

  1. Upgrade from RN 0.74.3 ro RN 0.76.2
  2. Run ./gradlew bundleRelease

React Native Version

0.76.2

Affected Platforms

Runtime - Android, Build - MacOS

Output of npx react-native info

System:
  OS: macOS 14.6.1
  CPU: (12) arm64 Apple M2 Max
  Memory: 809.80 MB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.1
    path: /opt/homebrew/opt/node@20/bin/node
  Yarn: Not Found
  npm:
    version: 10.2.4
    path: /opt/homebrew/opt/node@20/bin/npm
  Watchman:
    version: 2024.05.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.2
    path: /Users/ajouve/.rvm/gems/ruby-2.7.5/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: 2022.3 AI-223.8836.35.2231.10671973
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 22.0.1
    path: /opt/homebrew/opt/openjdk/bin/javac
  Ruby:
    version: 2.7.5
    path: /Users/ajouve/.rvm/rubies/ruby-2.7.5/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.2
    wanted: 0.76.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

/Users/xxx/.gradle/caches/8.10.2/transforms/0fd0166c4f0b7f2b3a94f0420432a518/transformed/material-1.6.1/res/values/values.xml:7497:4: Duplicate value for resource 'attr/actionBarSize' with config 'DEFAULT' and product ''. Resource was previously defined here: com.xxx.xxx.app-mergeDebugResources-79:/values/values.xml:8497: .

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
   > Resource compilation failed (Failed to compile values resource file /Users/xxx/Developer/xxx/app-native/android/app/build/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml. Cause: java.lang.IllegalStateException: Can not add resource (com.android.aaptcompiler.ParsedResource@329c2b83) to table.). Check logs for more details.

Reproducer

https://github.com/react-native-community/reproducer-react-native

Screenshots and Videos

No response

@react-native-bot react-native-bot added Platform: Android Android applications. Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Nov 19, 2024
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@yurihikari
Copy link

I have the same issue. However, since I use eas and expo, the prebuild command during the EAS build process alway clean the android directory, so even the enableJetifier=true solution isn't a viable temp solution for me, as it won't add that line in the gradle.properties.

@baptiste-mnh
Copy link

Same probleme here using Expo with the 0.76.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications.
Projects
None yet
Development

No branches or pull requests

4 participants