Tôi đang gặp phải sự cố này từ vài ngày. Khi tôi cố gắng xây dựng dự án gradle thorws tin nhắn này. Tôi đã làm sạch dự án đã tải xuống các phụ thuộc nhưng vấn đề vẫn chưa được giải quyết.Android Studio Gradle không thể xây dựng
Giúp tôi tìm ra bản sửa lỗi.
Thông báo lỗi
:app:dexDebug
Error:org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$FileCollectionSnapshotImpl cannot be cast to org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter$OutputFilesSnapshot
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
Thử xóa thư mục bộ nhớ cache gradle: 'C: \ Users \ \ .gradle \ cache' trên Windows,' ~/.gradle/cache' trên Linux/Mac –
rciovati
'./gradle --stop' để dừng tất cả daemon. Dự án của bạn có sử dụng trình bao bọc gradle không? Sau đó, bạn không cần phải sử dụng cài đặt gradle cục bộ của bạn './gradlew build' – Blundell
Là người mới. Tôi thực sự không hiểu câu trả lời của bạn. bạn sẽ vui lòng cụ thể hơn @RiccardoCiovati –