CLI does not build the correct productFlavor when --list-devices flag is used #37110
Labels
💻CLI
Needs: Triage 🔍
Resolution: Issue in another tool or repo
An issue that was opened against React Native but in reality is affecting another tool or library
Description
Version
0.71.7
uses@react-native-community/cli 10.2.2
and@react-native-community/cli-platform-android 10.2.0
.However, when running
run-android
with either--list-devices
or--deviceId <string>
flags, the arguments passed to Gradle arebuild -x lint
(ref) notwithstanding specifying the app flavor thruogh the--mode
or the deprecated--variant
flags.This has been solved by this PR and released with v11 of react native CLI, however at the moment it is not possible to use these features with version 0.71.7.
React Native Version
0.71.7
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.3.1
CPU: (8) arm64 Apple M2
Memory: 64.02 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.13.0
path: ~/.nvm/versions/node/v18.13.0/bin/node
Yarn:
version: 3.4.1
path: ~/.nvm/versions/node/v18.13.0/bin/yarn
npm:
version: 8.19.3
path: ~/.nvm/versions/node/v18.13.0/bin/npm
Watchman:
version: 2023.03.20.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.11.3
path: /Users/stefano.formicola/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.2
- iOS 16.2
- macOS 13.1
- tvOS 16.1
- watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9862592
Xcode:
version: 14.2/14C18
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.18
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/stefano.formicola/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 11.2.0
wanted: 11.2.0
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.71.7
wanted: ^0.71.0
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
Init a new v0.71.7 project and add an Android productFlavor. Try to run-android specifying that app flavor through the --mode flag.
Snack, code example, screenshot, or link to a repository
N/A
The text was updated successfully, but these errors were encountered: