Description
Environment
System:
OS: macOS 15.2
CPU: (8) arm64 Apple M3
Memory: 113.23 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.12.2
path: ~/.nvm/versions/node/v20.12.2/bin/node
Yarn:
version: 1.22.22
path: /usr/local/bin/yarn
npm:
version: 10.5.0
path: ~/.nvm/versions/node/v20.12.2/bin/npm
Watchman:
version: 2025.05.26.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/aryandev/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK:
API Levels:
- "29"
- "31"
- "34"
- "35"
Build Tools:
- 31.0.0
- 34.0.0
- 35.0.0
System Images:
- android-31 | Google APIs ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
- android-36 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.3 AI-243.25659.59.2432.13423653
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.14
path: /opt/homebrew/opt/openjdk@17/bin/javac
Ruby:
version: 2.7.5
path: /Users/aryandev/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: 18.0.0
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: true
newArchEnabled: true
Description
A brand new project, created with npx @react-native-community/cli init, fails to build for Android with a Duplicate value for resource 'attr/actionBarSize' error. This issue seems to be caused by a persistent, untraceable caching problem that survives standard cleaning procedures.
We have attempted the following fixes, none of which resolved the issue:
Forcing dependency versions for appcompat and material in build.gradle.
Overriding actionBarSize in styles.xml.
Cleaning the build (./gradlew clean).
Stopping the Gradle daemon (./gradlew --stop).
Completely deleting the Gradle cache (rm -rf ~/.gradle/caches).
Completely deleting the android directory and regenerating it from a temporary project.
The error persists through all of these steps, indicating a deep issue with the build process or caching mechanism. The error log references a temporary project name (com.recalltemp.app) even after the regenerated android directory has been configured with the correct project name, which strongly suggests a caching problem that is not being cleared by standard methods.
Reproducible Demo
Run npx @react-native-community/cli init MyTestApp
cd MyTestApp
Run npm run android
Expected Behavior: The default application should build and run successfully on an Android emulator or device.
Actual Behavior: The build fails during the :app:mergeDebugResources task with the Duplicate value for resource 'attr/actionBarSize' error.