rhttp
rhttp copied to clipboard
Could not find method exec() for arguments [CargoKitBuildTask$_build_closure2@457be97d] on project ':rhttp' of type org.gradle.api.Project.
flutter version:3.35.4 rhttp version:0.13.0
Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method exec() for arguments [CargoKitBuildTask$_build_closure2@457be97d] on project ':rhttp' of type org.gradle.api.Project.
how can i fix it
This is a corrupted Gradle cache issue. Happens when the build process gets interrupted or the daemon crashes.
Try this to fix
Stop Gradle daemon first:
cd android
./gradlew --stop
cd ..
Try to clear the corrupted cache
# Remove all caches (safe, will regenerate)
rm -rf ~/.gradle/caches/
# Or just the specific version
rm -rf ~/.gradle/caches/x.xx.x/
Or try to clean everything:
cd android
./gradlew clean --no-daemon
cd ..
flutter clean
# Remove build folders
rm -rf android/.gradle/
rm -rf android/build/
rm -rf build/
And then reinstall dependencies:
flutter pub get
# and run again
flutter run
I hope this help