React Native error while creating app " Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory()."

I had a similar issue here, in my case it was related to access permission. Just give read access to the project folder.

Command:

chmod -R 777 YourFolder/

My log error:

spawnSync ./gradlew EACCES

Error: spawnSync ./gradlew EACCES
    at Object.spawnSync (internal/child_process.js:998:20)
    at spawnSync (child_process.js:622:24)
    at Object.execFileSync (child_process.js:650:13)
    at runOnAllDevices (/Users/willowchung/project/AwesomeApp/node_modules/react-native/local-cli/runAndroid/runAndroid.js:299:19)
    at buildAndRun (/Users/willowchung/project/AwesomeApp/node_modules/react-native/local-cli/runAndroid/runAndroid.js:135:12)
    at isPackagerRunning.then.result (/Users/willowchung/project/AwesomeApp/node_modules/react-native/local-cli/runAndroid/runAndroid.js:65:12)
    at processTicksAndRejections (internal/process/next_tick.js:81:5)

Hope it helps!


run chmod 755 android/gradlew

that should do the work


Check the version of Java JDK you are using. I tried version 11 at first but got the same error you have, then I installed Java JDK version 8 and update the JAVA_HOME setting correctly according this therefor problem solved.

Tags:

React Native