Sparsh Dutta
Sparsh Dutta

Reputation: 2990

Android Studio not recognising some packages

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.

Upvotes: 0

Views: 1463

Answers (3)

Patel Dishant
Patel Dishant

Reputation: 80

In Manifest file Enter PackageName Like this

package="com.bi.bio"

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

Upvotes: 0

ʀᴀʜɪʟ
ʀᴀʜɪʟ

Reputation: 298

Try:-

  1. Rebuilding the project

    Build -> Rebuild

  2. Invalidate cache.

    File -> Invalidate cache and restart

Upvotes: 1

Sparsh Dutta
Sparsh Dutta

Reputation: 2990

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.

Upvotes: 0

Related Questions