Unable to run android: yarn android
slgauravsharma opened this issue · 1 comments
Unable to run android: yarn run android
yarn android yarn run v1.21.1 $ yarn workspace mobile android $ react-native run-android info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 0 file(s) to forward-jetify. Using 8 workers... info Starting JS server... info Installing the app... :ReactNative:Passing custom root is deprecated. CLI detects root automatically now. :ReactNative:Please remove second argument to
applyNativeModulesSettingsGradle`.
Configure project :app
:ReactNative:Passing custom root is deprecated. CLI detects root automatically now
:ReactNative:Please remove second argument toapplyNativeModulesAppBuildGradle
.
FAILURE: Build failed with an exception.
-
What went wrong:
Task 'installDebug' not found in project ':app'. -
Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 2s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
-
What went wrong:
Task 'installDebug' not found in project ':app'. -
Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 2s
at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:13)
at runOnAllDevices (/home/xavient/My/my/React Native/react-native-web-monorepo/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:39)
at buildAndRun (/home/xavient/My/my/React Native/react-native-web-monorepo/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41)
at then.result (/home/xavient/My/my/React Native/react-native-web-monorepo/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/bin/node
Arguments: /usr/share/yarn/lib/cli.js android
Directory: /home/xavient/My/my/React Native/react-native-web-monorepo/packages/mobile
Output:
info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
`
sI was able to get it working by updating the two calls of applyNativeModulesSettingsGradle
in build.gradle
and settings.gradle
by removing the second argument.
settings.gradle
line 211
applyNativeModulesSettingsGradle(settings)
build.grade
line 2
applyNativeModulesAppBuildGradle(project)