r/AndroidStudio • • Jul 05 '21

help me get past this error causing line : tools:context=".MainActivity"

Post image
2 Upvotes

9 comments sorted by

2

u/oreocoloredcat Jul 06 '21

Go to file > invalidate cache and restart

Common problem I’ve seen when making activities from time to time

Also make sure your mainactivity extends appcompatactivity

Also I highly recommend making your new project in kotlin :D

1

u/[deleted] Jul 06 '21

didn't work but thanks and I thought java was better ?

→ More replies (1)

1

u/minibuster Jul 05 '21

What does your AndroidManifest.xml look like? And does the package you have entered in there match the package of your MainActivity class?

2

u/[deleted] Jul 06 '21

the package name didn't match...error fixed! thanks!

2

u/minibuster Jul 06 '21

Great! And now you learned a bit more about Android manifest.xml :)

→ More replies (1)