简体   繁体   中英

Android Studio don't recognise xml file in layout

I have a xml file layout ( fragment_navigation.xml ) but android studio doesn't seem to recognise it as xml.

No xml icon

没有xml图标

No syntax highlight

在此处输入图片说明

I create the same layout with different filename and it works for a time after close and open the project again.

My environment is:

Android Studio 3.2.1
Build #AI-181.5540.7.32.5056338, built on October 9, 2018
JRE: 1.8.0_152-release-1136-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.2

Ok, I saw an option right-clicking on xml file "Mark as XML" .

And it persist for next project opening.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM