Michael Joseph Aubry
Michael Joseph Aubry

Reputation: 13402

Android studio project is messed up due to moving files around

I tried to create new packages to organize the java folder but then I moved them out of the new package. Now I am having issues.

MainActivity is not being recognized in the AndroidManifest.xml

The files are now green colored?

How can I restore the files to working condition, any suggestions?

enter image description here

Upvotes: 1

Views: 2422

Answers (2)

Pratyush Yadav
Pratyush Yadav

Reputation: 271

Try doing a Gradle sync in Tools>Android.

Otherwise, copy your Activities back to where they were before you moved them. Then move them using the Refactor menu (Right-click on your java class, go to Refactor submenu and hit move).

Upvotes: 3

Helmi
Helmi

Reputation: 556

Manifest folder should not be marked as source root right click on manifest folder ->mark directory as -> Unmark...

Upvotes: 0

Related Questions