21

I'm doing a school coding project using Android Studio with Google Drive to store my app files. Google Drive is generating these desktop.ini files. Every time I delete or modify them, they are regenerated, even when I shut down Google Drive. How can I fix this? I cannot run or debug my project with this error.

enter image description here

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
TheKoopaGaming
  • 211
  • 1
  • 2
  • 3

3 Answers3

2

As a matter of fact the desktop.ini file is created only in Google Drive folder. So you can't blame it on Windows. If it is Windows, then the file should be everywhere. Also, if you open the desktop.ini in Notepad you will see the following lines:

[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
IconIndex=16

See InfoTip and IconFile. There is no way Windows would be doing this.

veetto
  • 77
  • 6
  • 4
    This is a Windows feature. Every custom folder has a desktop.ini file. And Google drive app uses this feature to modify the folder appearance to represent a shared, synced, and so on folder status. Windows uses this to display the folder icon. So, as a matter of fact, it is a Windows feature. – Alex8752 Oct 30 '20 at 14:24
  • 3
    This does not attempt to answer the question, at best it should be a comment to [this answer](https://stackoverflow.com/a/34318711/284111). – Andrew Savinykh Dec 18 '21 at 02:12
-1

I got my solution:

1)Open ini file's Property Dialog

2)Hide this file in System File way,use this cmd:attrib +h +s "D:\Google Docs\desktop.ini" /s /d

3)Deny all Access Privilage in Property Dialog,like this: enter image description here

4)Just refresh folder!

Ensk
  • 41
  • 8
-3

Desktop.ini files are generated by Windows, not Google Drive. When you open a folder in Windows, it creates a desktop.ini file. The desktop.ini file stores the view settings for that folder.

As to why you are getting build errors in Android Studio simply because this file exists, I can't answer at the moment. I have successfully built many Android projects in Android Studio with that file in the folder.

Scott Page
  • 46
  • 1
  • 7