简体   繁体   中英

How to run downloaded nested demo Android project from Github with Eclipse?

I'm trying to run a demo project downloaded from GITHUB. And inside it, it contains demo folders (for example github project ) that can be used as another Android project. I don't know how to run neither the outer nor the inner project. What I have done are:

  1. Added Android library (for example Android.2.2) to project. However, the res folder is in the demo folder, so the outer prj generate the error msg that src is not found.
  2. When I tried to run the demo project by creating a new Android project from existing code, it can't run because lacking some libs from outer...

I guess there is a quick way to make it run.

Can anyone help me to configure the project to run it?

Here is the step to run the downloaded project:

  1. Download the Project as zip folder eg: from https://github.com/commonsguy/cwac-merge/downloads
  2. Save the folder on your hard disk.
  3. open the eclipse
  4. Clic on File-> import -> general->Existing project into workspace -> next-> select archive folder -> browse -> select your zip folder you have downloaded -> Finish.
  5. The project which you downloaded from the given link needs to configure build path to add library project. For this right click on MergeAdapterDemo Project ->Build Path -> configure build path-> select project tab-> Add -> select MergeAdapter .

Hope it helps you.

You should set the workspace folder of eclipse to the folder that the project tells you to do. in this example it is probably the root folder.. Because it had the .classpath file.

Thanks for the replies. Here is the solution:

  1. Import both inner and outer project as eclipse android projects, we have 2 of them.
  2. Normally, the outer is the "library" project (check it by bring the property of the project) and inner project use outer as its library (when bring the properties of inner project, in Android--> "Is Library" should refer to outer project (jar file if the outer built successfully))
  3. Build the outer, normally in bin folder will generate the jar file
  4. After that, the inner can be normally executed as Android Application

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