简体   繁体   中英

Importing an Android project into Eclipse

I am trying to import a project from the Android Developpers website.

The name of the project : DoneBar

I have saved the project in a folder different than my Eclipse workspace.

So, this is what I did : File -> Import -> Existing Android Code Into Workspace.

Then, I have clicked on the root directory of the project which is DoneBarSimple as shown in the picture.

项目的树描述

The problem is : When the project is imported into Eclipse; it has some random errors.

Plus, I noticed, two project were created : MainActivity and tests

And I have two errors messages in the error log.

Failed to load properties files for project "MainActivity" Failed to load properties files for project "tests"

Am I doing something wrong ?

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?

That is an Android Studio project you're trying to import, which uses the Gradle build system. You should install Android Studio if you want to import that project (I recommend it over Eclipse anyway).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM