React-Native - Could not configure services using GradleScopeCompileServices.configure()

Viewed 341

In react native im using react-native run-android and i keep getting this error

                        Welcome to Gradle 6.7!

                    Here are the highlights of this release:
                    - File system watching is ready for production use
                    - Declare the version of Java your build requires
                    - Java 15 support

                    For more details see https://docs.gradle.org/6.7/release-notes.html


                    FAILURE: Build failed with an exception.

                    * What went wrong:
                    Could not create an instance of type org.gradle.invocation.DefaultGradle.
                    > Could not configure services using GradleScopeCompileServices.configure().

                    * 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 1m 36s

                    error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
                    Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

                    FAILURE: Build failed with an exception.

                    * What went wrong:
                    Could not create an instance of type org.gradle.invocation.DefaultGradle.
                    > Could not configure services using GradleScopeCompileServices.configure().

                    * 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 1m 36s

                        at makeError (C:\Users\tp_re\source\repos\Wcarnapp\node_modules\execa\index.js:174:9)
                        at C:\Users\tp_re\source\repos\Wcarnapp\node_modules\execa\index.js:278:16
                        at processTicksAndRejections (node:internal/process/task_queues:93:5)
                        at async runOnAllDevices (C:\Users\tp_re\source\repos\Wcarnapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
                        at async Command.handleAction (C:\Users\tp_re\source\repos\Wcarnapp\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)

when i do react-native info i get:

info Fetching system and libraries information...
(node:600) Warning: Accessing non-existent property 'padLevels' of module exports inside circular 
dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Memory: 2.86 GB / 15.71 GB
Binaries:
Node: 15.5.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.10 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
  API Levels: 29
  Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3
  System Images: android-29 | Android TV Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version  4.1.0.0 AI-201.8743.12.41.6858069
Visual Studio: 16.8.30804.86 (Visual Studio Professional 2019)
Languages:
Java: javac 16
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-windows: Not Found
npmGlobalPackages:
*react-native*: Not Found
0 Answers
Related