skip to Main Content

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:

Project Structure

This image shows the error while trying to add an Activity in a package, in manifest:

Manifest error

What do I do to make Android Studio recognise all my packages.

3

Answers


  1. Chosen as BEST ANSWER

    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.


  2. In Manifest file Enter PackageName Like this

    package="com.bi.bio"
    
    

    Like this, you can add activity in the manifest file.

    Login or Signup to reply.
  3. Try:-

    1. Rebuilding the project

      Build -> Rebuild

    2. Invalidate cache.

      File -> Invalidate cache and restart

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search