RocketChat / Rocket.Chat.ReactNative

Rocket.Chat mobile clients
https://rocket.chat
MIT License
1.99k stars 1.16k forks source link

Error: Can't determine type for tag '<macro name="m3_comp_assist_chip_container_shape"> #5525

Closed webcyst-gursahb closed 7 months ago

webcyst-gursahb commented 7 months ago

Description:

When I try to build release apk of app, this error came up.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-screens:mergeReleaseResources'.
> /Users/gursahb/.gradle/caches/transforms-3/5171bcd0ca0dbd0e6d8776d123ec1f40/transformed/material-1.9.0/res/values/values.xml: Error: Can't determine type for tag '<macro name="m3_comp_assist_chip_container_shape">?attr/shapeAppearanceCornerSmall</macro>'

This error is because of react-native-screens, Which uses com.google.android.material:material with version 1.9.0. But this version isn't supported by app (Written in android/app/build.gradle file line 384).

Environment Information:

Steps to reproduce:

  1. Clone this repo https://github.com/RocketChat/Rocket.Chat.ReactNative.git
  2. Follow the whitelabeling steps for android. https://developer.rocket.chat/open-source-projects/mobile-app/mobile-app-white-labelling/android-app-white-labelling
  3. Then try to create release build by executing following command. cd android && ./gradlew assembleRelease

Expected behavior:

I want to create installable apk build of App.

Actual behavior:

Build failed cause of Error: Can't determine type for tag '<macro name="m3_comp_assist_chip_container_shape">?attr/shapeAppearanceCornerSmall</macro>

Additional context:

React Native Info

System:
    OS: macOS 14.3
    CPU: (8) arm64 Apple M1
    Memory: 107.00 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v18.19.0/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
    Watchman: 2023.11.20.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.14.3 - /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.11330709
    Xcode: 15.2/15C500b - /usr/bin/xcodebuild
  Languages:
    Java: 17.0.9 - /opt/homebrew/opt/openjdk@17/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: RocketChat/react-native#6cf729c196f0f043ac6e7444e73f5a560d7a8a8a => 0.68.7 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
GleidsonDaniel commented 7 months ago

It is already fixed in this PR: https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/5506 https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/e06aaf1cc0e24ac36c3f0573ce76da63fd79b89b/android/app/build.gradle#L387 https://docs.gradle.org/current/userguide/rich_versions.html

Check your node modules folder or redo the install again.

webcyst-gursahb commented 7 months ago

Could you help me understading how I can fix this? Because I tried re-cloning the repo, but It problem remains same. I didn't understand that how your mentioned pull request will help me.

Monkhai commented 7 months ago

I have the exact same problem. It does not seem to be fixed!