Sudden error layout

0

In an android project, I had the following line in main_activity.xml without giving any error:

tools:context="com.example.alumno.prueba_2.Launch" (activity main.xml, carpeta layout dentro de res)

but now it does (unresolve launch class) without having changed anything for it. Why is it?

    
asked by pepito 29.06.2017 в 15:21
source

2 answers

0

Now you have an error because the name of the class changed or the package that contains it.

tools:context="com.example.alumno.prueba_2.Launch" 
  • Ensure the name of the class is correct as well as the package that contains it.

  • Ensure that the class is the one that loads the layout by setContentView() .

  • As another option, you can also delete the line to avoid the problem.

answered by 01.07.2017 в 07:27
0

Try the following:

tools:context="ruta_de_tu_actividad_a_la_que_hace_referencia_al_layout"

Example:

tools:context="com.example.alumno.prueba_2.LaunchActivity"

Greetings.

    
answered by 29.06.2017 в 18:18