Doesn't build after project initialization
See original GitHub issueAfter recent update in cli-platform-android the project doesn’t start. Stating Cannot invoke method getErrorStream() on null object. I wanted to submit an issue for that package but I could not find a github repo for that.
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 863 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
:ReactNative:Cannot run program "npx": CreateProcess error=2, ═х єфрхЄё  эрщЄш єърчрээ√щ Їрщы
:ReactNative:Automatic import of native modules failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\TEMP\natapp\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 169
* What went wrong:
A problem occurred evaluating script.
> Cannot invoke method getErrorStream() on null object
* Try:
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 1s
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 --v
erbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Script 'C:\TEMP\natapp\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 169
* What went wrong:
A problem occurred evaluating script.
> Cannot invoke method getErrorStream() on null object
* Try:
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 1s
    at checkExecSyncError (child_process.js:621:11)
    at execFileSync (child_process.js:639:15)
    at runOnAllDevices (C:\TEMP\natapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
    at buildAndRun (C:\TEMP\natapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
    at C:\TEMP\natapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Command.handleAction (C:\TEMP\natapp\node_modules\@react-native-community\cli\build\index.js:164:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I’m running on Windows 10 x64 and node version is 12.8.0
Issue Analytics
- State:
 - Created 4 years ago
 - Reactions:19
 - Comments:54 (16 by maintainers)
 
Top Results From Across the Web
Spring-Boot application does not build properly - Stack Overflow
If your project is gradle then go to Project right click and go to >gradle >Refresh gradle project.
Read more >Initializing project data in the init lifecycle - Gradle Forums
So I looked a bit deeper, seems what i want to do isn't possible because the project object doesn't exist until after these...
Read more >Known issues with Android Studio and Android Gradle Plugin
To fix the issue for the current project, click Run > Edit Configurations and change the default JUnit configuration to only include the...
Read more >Create a new project | IntelliJ IDEA Documentation - JetBrains
This is a general-purpose project without specific frameworks. You will be able to add the necessary frameworks and technologies later at any ...
Read more >Troubleshoot initialization options | Firebase - Google
If you initialize your app without a valid set of Firebase options, ... and to associate client data with your Firebase project and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m on same status Node Version: v12.12.0 react-native --version 3.3.0-alpha.6
On Windows, npx command is “npx.cmd” and windows terminal can omit extensions for executables(i.e. bat,cmd,exe ) .so we can run npx by “npx” in the terminal, but it’s looks only in terminal (except for *.exe) I modified native_modules.gradle L.153 “npx --quiet react-native config” to “npx.cmd --quiet react-native config” ,then I could run run-android but it’s not smart and not portable.
CLI is a direct dependency of react-native and we want it to keep it this way. You can use yarn resolutions in package.json to pin to previous version: