react-native: Error on running Couldn't find "Debug" build variant.

New Version

0.72.0-rc.0

Old Version

0.71.3

Build Target(s)

Android

Output of react-native info

info Fetching system and libraries information… System: OS: Windows 10 10.0.19045 CPU: (8) x64 Intel® Core™ i7-4770S CPU @ 3.10GHz Memory: 1.49 GB / 11.91 GB Binaries: Node: 16.13.2 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 9.6.2 - C:\Program Files\nodejs\npm.CMD Watchman: 20210110.135312.0 - C:\ProgramData\chocolatey\bin\watchman.EXE Managers: RubyGems: Not Found SDKs: Android SDK: API Levels: 23, 26, 28, 29, 30, 31, 33 Build Tools: 28.0.3, 30.0.2, 30.0.3, 31.0.0, 33.0.1, 33.0.2 System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-33 | Google APIs Intel x86 Atom_64, android-33 | Google Play Intel x86 Atom_64 Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: AI-221.6008.13.2211.9619390 Visual Studio: 17.5.33424.131 (Visual Studio Professional 2022) Languages: Java: 11.0.2 - C:\Users\Miguel.Altamirano\AppData\Local\jdk-11.0.2\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.72.0-rc.0 => 0.72.0-rc.0 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

just create a new project

react-native init AwesomeProject --version 0.72.0-rc.0

cd AwesomeProject

npx react-native run-android

RESULT>>>>>>>

error Failed to install the app. Couldn’t find “Debug” build variant. Available variants are: . info Run CLI with --verbose flag for more details.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 22 (7 by maintainers)

Most upvoted comments

@lauhon please open new issue in https://github.com/react-native-community/cli and provide your setup.

i upgrade from 0.70.6 to 0.72.3, and the eact-native-community/cli version is 11.3.5, when run: yarn android, the error occur:

knight@192 awasome % yarn android
yarn run v1.22.19
$ react-native run-android
info Starting JS server...

info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 


error Failed to install the app. Couldn't find "Debug" build variant. Available variants are: .
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@kelset The fix is already merged in CLI, and it is released in v11.3.0

@pipo151086 can you run gradlew.bat tasks in android directory locally and pass the output?

This is definitely CLI related. @thymikee can we get someone to look into this?

please try with 0.72 RC2, we just released it and contains a bunch of improvements for CLI

Noup…

cant make it work

image

The same problem occurs