Free Android app covering all aspects of addiction, including prevention and treatment

Importing Android Studio projects into Eclipse

  • Written by  Clive

Importing Android Studio projects into eclipse

Eclipse import iconYou can’t import Android Studio projects into Eclipse.

Here’s what you can do:

  • Create a new project in Eclipse
  • Either copy and paste the relevant files directly from Android Studio into Eclipse
  • Or create new files in Eclipse and then copy and paste the code from the Android Studio files into the new Eclipse files.

Open the Android Studio files up in a text editor then copy and paste into the new Eclipse file

Android Studio file structur

The Android Studio file structure. The main folders are indicated by a yellow arrow

Looking at an Android Studio project folder in Windows Explorer

Android Studio in Windows Explorer

A typical Android Studio file structure as seen in Windows Explorer. We’re interested in the folder indicated by a yellow arrow

Android Studio Windows Explorer file layout

Opening up the dialog_tutorial folder reveals the src folder. Opening this reveals the java and res folders. The res folder contains all the resources

Opening up the dialog_tutorial folder reveals the src folder. This contains the:

  • java folder – containing the java class files (including the activities)
  • res folder – this is where you’ll find the layouts, drawables, menus and values files (strings, dimensions, colors)
  • AndroidManifest.xml – this is the manifest file

Here’s a typical Eclipse project’s file structure:

Eclipse file structure

The folders indicated by a yellow arrow are the important ones

Copying files directly

Class files

Copy the class files from Android Studio to Eclipse.

You may need to change the package name when you’re done.

Resource files

Shouldn’t be a problem to copy these files directly over from Android Studio to Eclipse.

AndroidManifest.xml

Probably best to edit it rather than copy directly over.

Open up the two manifest files (Android Studio and Eclipse) then copy and paste the code from the Android Studio manifest over to the Eclipse manifest.