Wrong file association for one file in IntelliJ / Android Studio Wrong file association for one file in IntelliJ / Android Studio xml xml

Wrong file association for one file in IntelliJ / Android Studio


Look in the Preferences > Editor > File Types under Text files, the name of your file is probably there, remove it.

Preferences > Editor > File Types


If you cannot find it there, the next option is to search IntelliJ's caches for the name of the file, e.g., find . -name "*.xml" | xargs grep "Whoopsies". IntelliJ has to be remembering that value somehow...


The cache locations depends on your operating system and IntelliJ version (source).

Windows

Windows Vista, 7, 8:

\Users\[USER ACCOUNT NAME]\.[PRODUCT][VERSION]

Windows XP:

[SYSTEM DRIVE]\Documents and Settings\[USER ACCOUNT NAME]\.[PRODUCT][VERSION]

*nix

~/.[PRODUCT][VERSION]

Mac OS X

Configuration:

~/Library/Preferences/[PRODUCT][VERSION]

Caches:

~/Library/Caches/[PRODUCT][VERSION]

Plugins:

~/Library/Application Support/[PRODUCT][VERSION]

Logs:

~/Library/Logs/[PRODUCT][VERSION]


I got the same sort of problem. I found my file in the following File Type:

enter image description here


What seemingly worked for me on macOS Mojave 10.14.1 is removing ~/Library/Preferences/AndroidStudio3.2, but this will reset every setting to the default.