Gradle > Task :app:generateSafeArgsDebug FAILED
Got the same error. Did a search with grep -r "\x00" app/src/main/res
and a app/src/main/res/navigation/.DS_Store file came up. Deleted it and everything played out.
I have this problem in Android Project with Navigation component and I have navigation dir with empty navigation xml file just remove navigation dir and rebuild then I can build.