0

I am importing an old project into Android Studio and although I have all the files in the project I get "Module Not Defined" when I try to run the app.

In Android Studio. I said "Open existing application" then I selected the root folder of my app. And now the files appear in the "Project Files" view. I am not sure what module refers to?enter image description here

No Import Project Option:

enter image description here

john doe
  • 9,220
  • 23
  • 91
  • 167
  • File -> Import -> `build.gradle` when importing old Android Studio projects. If this isn't Android Studio, manually convert it to one. – Jared Burrows Mar 24 '15 at 19:07
  • Android does not have any option with the name "Import". – john doe Mar 24 '15 at 19:08
  • Android Studio and Intellij both have "Import Project". – Jared Burrows Mar 24 '15 at 19:09
  • Are you saying that I should first create a new Android Project and then use the Import Project feature. – john doe Mar 24 '15 at 19:10
  • Read my first comment: When importing old Android Studio projects, File -> Import project -> click on build.gradle. If this isn't Android Studio, manually convert it to one. – Jared Burrows Mar 24 '15 at 19:11
  • The file option appears after the screen where you have to create a new project, open an existing project, import android code sample. Do you see that screen? – john doe Mar 24 '15 at 19:13
  • Its on the start screen and in the actual IDE itself: http://www.cnx-software.com/wp-content/uploads/2013/05/Android_Studio.jpg. – Jared Burrows Mar 24 '15 at 19:14
  • The latest version of Android Studio does not! See my screenshot in the original question. – john doe Mar 24 '15 at 19:15
  • Also, is this an Eclipse project or an existing Android Studio project? Read my comments, please. You can still File -> import project. – Jared Burrows Mar 24 '15 at 19:17
  • I am not able to understand your comments. You are saying if it is not an Android Studio project then manually convert it to one. What does that mean? How do I convert an Eclipse project to Android Studio project? – john doe Mar 24 '15 at 19:19
  • You simply can import it: "import non-android studio project" or simply copy and paste the sources. – Jared Burrows Mar 24 '15 at 19:20
  • You say select "build.gradle" file but there is no such file in my old project. – john doe Mar 24 '15 at 19:21
  • I have answered all of your questions. If **Eclipse-based project**: Copy and paste your sources manually or click on "import non-android studio project". If **Android-Studio-based project**: you can open/import then click on the `build.gradle`. Please google this stuff. https://developer.android.com/sdk/installing/migrate.html – Jared Burrows Mar 24 '15 at 19:24
  • OK! Looks like I have to download Eclipse just to export the build.gradle which I can then feed to Android Studio to import the project. – john doe Mar 24 '15 at 19:25
  • But that is a waste of time. Just copy your res in to the res folder and copy your sources into the java folder. Learn Android Studio and learn Gradle. – Jared Burrows Mar 24 '15 at 19:26
  • possible duplicate of [How do I open my existing Eclipse projects in Android Studio?](http://stackoverflow.com/questions/16584263/how-do-i-open-my-existing-eclipse-projects-in-android-studio) – Jared Burrows Mar 24 '15 at 19:29
  • The link that you provided also said to download Eclipse and then export the project and then import it into the Android Studio. I will see if there is a shortcut to the game. – john doe Mar 24 '15 at 19:31
  • I provided you that link because it is the official documentation. – Jared Burrows Mar 24 '15 at 19:32

0 Answers0