When I run ./gradlew assembleRelease
build is failed with this error:
Error:Execution failed for task ':app:bundleReleaseJsAndAssets. > A problem occurred starting process 'command 'node'
I searched on the internet and found some topics about it, but I couldn't solve my problem.
React-Native version: 0.54.0
EDIT:
Now I'm running ./gradlew assembleRelease --info
from the terminal instead of Android Studio and I get different error.
Here is the result:
> Task :app:processReleaseResourcesPutting task artifact state for task ':app:processReleaseResources' into context took 0.007 secs.file or directory '**/android/app/libs', not foundfile or directory '**/node_modules/appcenter-crashes/android/libs', not foundfile or directory '**/node_modules/appcenter-analytics/android/libs', not foundfile or directory '**/node_modules/appcenter/android/libs', not foundfile or directory '**/node_modules/react-native-interactable/lib/android/libs', not foundfile or directory '**/node_modules/react-native-navigation/android/app/libs', not foundfile or directory '**/android/app/libs', not foundfile or directory '**/node_modules/appcenter-crashes/android/libs', not foundfile or directory '**/appcenter-analytics/android/libs', not foundfile or directory '**/node_modules/appcenter/android/libs', not foundfile or directory '**/node_modules/react-native-interactable/lib/android/libs', not foundfile or directory '**/node_modules/react-native-navigation/android/app/libs', not foundExecuting task ':app:processReleaseResources' (up-to-date check took 0.035 secs) due to: Task has failed previously.All input files are considered out-of-date for incremental task ':app:processReleaseResources'.Unable do incremental execution: full task runfile or directory '**/android/app/libs', not foundfile or directory '**/node_modules/appcenter-crashes/android/libs', not foundfile or directory '**/node_modules/appcenter-analytics/android/libs', not foundfile or directory '**/node_modules/appcenter/android/libs', not foundfile or directory '**/node_modules/react-native-interactable/lib/android/libs', not foundfile or directory '**/node_modules/react-native-navigation/android/app/libs', not foundfile or directory '**/android/app/libs', not foundfile or directory '**/node_modules/appcenter-crashes/android/libs', not foundfile or directory '**/node_modules/appcenter-analytics/android/libs', not foundfile or directory '**/node_modules/appcenter/android/libs', not foundfile or directory '**/node_modules/react-native-interactable/lib/android/libs', not foundfile or directory '**/node_modules/react-native-navigation/android/app/libs', not foundAapt2QueuedResourceProcessor is using **/Android/sdk/build-tools/26.0.2/aapt2Failed to execute aaptcom.android.ide.common.process.ProcessException: Failed to execute aapt***FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:processReleaseResources'.> Failed to execute aapt
It seems gradle is looking for libs folder in all modules, but there are no libs folders in the node modules. It's true, but I don't know why gradle is looking for libs folder.