In my project I have a package com.bi.bio, and within it are packages like "base", "data", "events", "auth" etc. When I try to add my activities to the manifest from, say, "auth", the "auth" package is not recognised – with message "class referenced not found in project or libraries".
Similarly some other packages like "events" are not recognised, while some packages, say "base", are getting recognised.
This image shows my project structure:
This image shows the error while trying to add an Activity in a package, in manifest:
What do I do to make Android Studio recognise all my packages.
3
Answers
Actually, had forgotten to set the package name properly in the Activity concerned, after copying the Activity from another module.
Worked after correcting the package name in my Activity.
In Manifest file Enter PackageName Like this
Like this, you can add activity in the manifest file.
Try:-
Rebuilding the project
Build -> Rebuild
Invalidate cache.
File -> Invalidate cache and restart