luke cross
luke cross

Reputation: 331

How i can't create Fragments and Activity on Android Studio? Error cannot find

I have an app example running with Navigation Drawer and I need to create a tabbed screen, I went to the example and I created TabLayout, but I want to add other tabs, when I try to create a new Fragment from the Android Studio options, it creates the class but cannot find the class .xml even though it is already existing.

Follow the images, for example:

Creating fragment

And

This .XML created

But, in the class:

Error

This error returned is "Cannot resolve symbol 'fragment_fragment_devices' " BUT, THIS .XML EXIST .-

Upvotes: 0

Views: 1151

Answers (1)

Juan9900
Juan9900

Reputation: 23

Don't know if you still getting that error, but it happened to me and i just found out how to solve it. Go to "File" -> "Invalidate Caches/Restart..." -> INVALIDATE AND RESTART. Then just reopen your project and it should be solved. I've learned that sometimes invalidating caches and restarting can solve problems of that style.

Upvotes: 2

Related Questions