CreateProcess error=193, %1 is not a valid Win32 application
System: OS: Windows 10 10.0.17763 CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz Memory: 6.53 GB / 15.91 GB Binaries: Node: 10.16.3 - C:\Program Files\nodejs\node.EXE npm: 6.10.3 - C:\Users\oguzhan.kazak\AppData\Roaming\npm\npm.CMD SDKs: Android SDK: API Levels: 23, 25, 28 Build Tools: 28.0.3, 29.0.2 System Images: android-23 | Google APIs Intel x86 Atom_64 IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.6010548 npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5
FAILURE: Build failed with an exception.
-
Where: Script 'C:\Projects\TerminalMobil\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 154
-
What went wrong: A problem occurred evaluating script.
Cannot run program "C:\Projects\TerminalMobil\node_modules@react-native-community\cli\build\bin.js": CreateProcess error=193, %1 is not a valid Win32 application
react-native run-android throws this error.
@amduffy19 Did you try downgrading @react-native-community/cli-platform-android to 2.9.0 ?
@sclavijo93 I'm trying to but having trouble getting it to downgrade due to my version of react-native I think. Working on it...
@amduffy19 Try removing the line '@react-native-community/cli-platform-android....' from dependencies in the package.json then follow this https://github.com/react-native-community/cli/issues/965#issuecomment-586056786
@sclavijo93 Thanks but still not working :( Trying to downgrade react-native to 0.60.0 now...
That worked, thanks!
Wish this issue was closed 7 days ago and I didn't see it. It was a good heads up. Anyway, this is fixed with latest CLI, so just re-install your node_modules.