Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

294
Vistas
Android Studio Open Wrong File When Trying to Open XML layout file

I am using android studio 3.3, my project is using kotlin 1.3.20 with build gradle 3.3.0

however when i try to open xml file, it open different file with the right file name and the right file path:

enter image description here

And when i try to see this xml file in my Git, my file is normal

enter image description here

when i try to run this project, it run with no problem at all. i already try to invalidate caches/restart but the problem still exist.

this error affecting random xml files. some of my xml layout files open my kotlin file. some of them open auto generated file

please help.... is this something to do with error indexing? how can i fix this?

UPDATE :

found someone who might have the same problem with this, in google issue tracker : https://issuetracker.google.com/issues/122988154

UPDATE 2 :

this issue is not just happen in xml file but also in kotlin file.

i try to open my activity file, but it open one of data binding generated classes

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

So Apparently this issue is bug in Android Studio. after do some research, this bug might be happen not just to xml layout but other xml file too such as resource like dimens, strings, style etc..

finally there is some workaround for this issue that work without reinstall Android Studio. Thank you @ChetanJoshi for the suggestion in the comment section.

Steps:

  • Copy the error xml file to somewhere in your PC directory (as backup file)
  • Delete the error xml file, if there is dialog file usage appear klik delete anyway
  • Copy the backup file and paste it back to where it was deleted
  • Run your project. it should run
  • If you are using Data Binding and there is error appear about auto generated data binding class, Clean Project then rebuild project. if the error still appear try to invalidate caches/restart, rebuild project then run the project
over 4 years ago · Santiago Trujillo Denunciar

0

  • Restart your Android Studio, if not working, Restart your PC. or
  • Go to plugins -> Android support and disable this. Restart Android studio and enable the plugin again

After that don't forget to Refresh your Gradle project.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda