How to Import Existing Android Project into Eclipse

How to import existing Android project into Eclipse?

Solved: If you want to "Create project from existing source", you need to create a new directory and then put the project directory tree into that new directory. Then point to the new directory when importing.

How to import an existing Android Library project into Eclipse workspace

Right click on Workspace - > Import -> Existing Android Code Into Workspace -> Library Folder

Note:

To avoid other inconveniences, do this:

1) Once is already in your Workspace, make sure that the project is marked as "Library." Right click on Library -> properties -> Android -> Check Is Library

2) At the time of importing, change the name of the folder. Please, specify something different than just "library". Projects on github usually come that way.

3) Make sure that every file is in the folder. For instance, Eclipse won't import anything if project.properties is not inside the Library folder. In a similar situation, Eclipse could import the project, but it would not create the R.java file if something is missing or there are errors in the layouts of the library.

4) Make sure that all dependencies match with your project. For instance, if certain library needs android-support-v4.jar, make sure that both (project and library) share the same version of the file. Once again properties -> Java Build Path -> Libraries -> Add or remove Jars

5) To make your project dependent of the imported library, Right Click on the project -> properties -> Android -> scroll until the end and add the imported library.

Importing an Android project into Eclipse

As it was already said, its an Android Studio Project. It is not possible to import this kind of project into eclipse directly. But:

You cannot import the project directly but it's not to hard to achieve it:

  • Create a new Android empty project in eclipse

  • Overwrite the fresh res/ folder and the AndroidManifest.xml file,
    with the ones from the Android Studio project

  • Copy the content of the java/ folder from the Android Studio project
    (it should contain your package name folder structure, like
    com/example/app/, and the java files of course) in the Eclipse src
    folder

  • Link your needed libraries if it's the case

Basically the Android application fundamental elements are the java files, the manifest file and the resources. From there you can build back a project in your favorite IDE

Answer from: How do you open an Android Studio project in Eclipse?

Eclipse import existing android project

Vova,

Here's the deal. Basically, that project does not have the .classpath or .project file. If you are trying to open with Eclipse it needs the .project file. So simply put, do this:

a. If you already have a built project in the workspace, just copy the .project and .classpath file from that folders root into the root of AnimationsDemo (the same folder where the AndroidManifest.xml is for that project)
b. Simply open the .project file with a notePad
c. In the tag 'name', change from your existing project's name to AnimationsDemo.

That's it.

Tell me if that works by accepting the answer!

-Vivek

Import sample project into eclipse

This is very easy:

Unzip the code, now you have the folder "LocationUpdates" containing the Manifest.xml file, /src and /res folders.

In Eclipse Go to: File > import > select Android Folder, Existing Android Code Into Workspace >
Browse to the directory where your project to import is located, and check the option Copy projects into workspace > Next > Change if you want the project name in New Project Name > Finish

Refresh F5 and Build your project

In other situations where we only have /res and /src folder, the only way is creating a new project.



Related Topics



Leave a reply



Submit