Gradle task assembleDebug failed

A problem was found with the configuration of task ‘:cloud_firestore:packageDebugResources’ (type ‘MergeResources’).

  • In plugin ‘’ type ‘’ property ‘publicFile’ is not writable because ‘D:\tempproject\olx_app_download\build\cloud_firestore\intermediates\public_res\debug\public.txt’ ancestor ‘D:\tempproject\olx_app_download\build\cloud_firestore\intermediates\public_res\debug’ is not a directory.

    Reason: Cannot write a file to a location pointing at a directory.

    Possible solution: Configure ‘publicFile’ to point to a file, not a directory.

I think D:\tempproject\olx_app_download\build\cloud_firestore\intermediates\public_res\debug is a file on your disk, but you try to create a file in it as directory. Delete that file and it probably works, unless it is actually your build that is creating that file.