i am facing the identical problem.

when i connect my mi a1 to PC, it's charging, but no option to change it to Transfer Files and it isnt detected on my PC.
it just happened recently after a few failed attempts to install gcam.

Can someone please give a solution to this problem?