Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run android: yarn android #41

Closed
slgauravsharma opened this issue Dec 30, 2019 · 1 comment
Closed

Unable to run android: yarn android #41

slgauravsharma opened this issue Dec 30, 2019 · 1 comment

Comments

@slgauravsharma
Copy link

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 to applyNativeModulesAppBuildGradle.

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.
`

@AdamMescher
Copy link
Contributor

AdamMescher commented Feb 12, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants