0

I have imported my android Eclipse project into Android Studio 1.0. The import ignored all of my source code files, so I have manually added them to the project. The error that I am getting is found on all of the activity names found in my AndroidManifest.xml file. For example:

<activity android:name="com.company.myapp.beforelogin.InitialActivity"></activity>

The AndroidManifest is unable to resolve the symbols "beforelogin" and "InitialActivity". I have read here (AndroidStudio : Cannot resolve symbol MainActivity) that Android Studio doesn't recognize my code as source code. So I tried this (How to get Android Studio to recognize file as source (test)) to add my directory as a sourceSet in my build.gradle file, but it didn't work. My project structure looks like this:

-app
    -src
        -build.gradle
        -main
            -res
            -com
            -AndroidManifest.xml

Any help would be greatly appreciated. Thanks.

Community
  • 1
  • 1
erics
  • 111
  • 11

1 Answers1

0

Assuming that com/ in your structure refers to the root package of your Java source, create a java/ directory as a peer of res/ (i.e., a child of main/) and move com/ into java/.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I was just about to take this question down because I fixed it with the exact same solution that you suggested. I didn't realize it was a necessity to have :) Thank you for the reply :) – erics Jun 30 '15 at 21:30