Reputation: 251
Android Studio 3.6.1 Gradle Version 5.6.4
Gradle Buid Error
Cannot create service of type TaskExecuter
using ProjectExecutionServices.createTaskExecuter()
as there is a problem with parameter #22 of type ReservedFileSystemLocationRegistry
.
Cannot create service of type ReservedFileSystemLocationRegistry using ProjectExecutionServices.createReservedFileLocationRegistry() as there is a problem with parameter #1 of type List<ReservedFileSystemLocation>.
Upvotes: 25
Views: 50305
Reputation: 1069
For Flutter Developer I have got the same problem.
cd android
and then run
./gradlew --stop
Upvotes: 2
Reputation: 661
I have faced the same issue in a react native project like below in the screenshot when I try to run the app in android simulator using yarn android
then I followed the below steps to resolve the issue which I got from the above
Step - 1: Go to android folder and delete build folder.
Step - 2: Run the below command like
cd android and ./gradlew --stop
and then you will see a response like Stopping Daemon(s)
Step - 3: Now running cd .. && yarn android
successfully launch the app without the above error.
Upvotes: 2
Reputation: 2453
in flutter or react-native go to android folder and run this in cmd
gradlew --stop
next
gradlew clean
to rebuild android or simple so you can restart your computer and run your flutter or react-native project again
Upvotes: 6
Reputation: 181
For anyone who has their project on their external drive
This worked for me
(MacOS Monterey)
Upvotes: 3
Reputation: 921
In my situation this worked, I'm using Android Studio on Windows 10
[![enter image description here][2]][2] 4. ran android/grandlew
[![enter image description here][3]][3]
Upvotes: 0
Reputation: 81
did u face this issue in react native,
Upvotes: 4
Reputation: 1106
I have faceed same issues in my flutter project for multiple build process and out of memory then I copy project from one folder to another folder and open project from android studio. It's working perfectly.
Upvotes: 0
Reputation: 4829
I simply had to restart my PC for this to get fixed. Unfortunately I didn't try this until after I tried most of the other solutions. 🙄
Upvotes: 21
Reputation: 1415
had same issue, stopping Gradle using the command below fixed it for me:
gradle --stop
or if you are using wrapper, use:
./gradlew --stop
Upvotes: 62
Reputation: 29
Remove the caches directory under c:\Users<Your user name directory>.gradle directory and do the build again. It worked for me.
Upvotes: 0
Reputation: 49
Creating a new project or performing a clean on any other project except the current one where the error exist solved the problem for me.
Upvotes: 0
Reputation: 371
I also had this when I tried building on my ExFAT formatted ssd on macos. Reformatting it using APFS solved it.
Upvotes: 9
Reputation: 467
For me the source of this error was wrong permissions within the project. A sudo chown -R <username> .
within the project's root fixed those issues.
Upvotes: 2
Reputation: 1
I had the same issue until I disabled the "Use detected ADB location" under Emulator Extended Controls > Settings. Restarted the emulator and was able to "Run" without any errors occurring anymore. Preview of "Use detected ADB location" setting.
Upvotes: 0
Reputation:
Backing up the answer from Alex. I got this issue when my project is in my external drive. I played around with device permission, file permission and even updated my android studio since I use VS Code for my flutter projects.
Finally made a sample project on android studio and thankfully got the same error message from Gradle. In this way, I knew the issue is not related to the VS code. As Alex said, I wiped the data from android device manager. But I got into some other issue. I let the virtual device to start completely and ran the project again and it worked.
Upvotes: 0
Reputation: 39
I ran into the same issue when trying to deploy another project on the same virtual device. For me it was solved by selecting "Wipe Data" for that Virtual Device in Android Virtual Device Manager.
Upvotes: 0