Building Applications for Android Applications in Eclipse

I downloaded the source to the spare parts here

https://android.googlesource.com/platform/development/+/gingerbread-release/apps/SpareParts

It includes the Android.mk , AndroidManifest.xml , Notice , res and src folders.

My question is, how can I compile this source code in Eclipse? I see that there is a make file ( Android.mk ) that I suppose I need to use, but I can’t figure out what to do to import this thing into Eclipse without 500+ errors.

+4
source share
3 answers

Brute force always works :)

  • Create a new Android project in Eclipse named SpareParts
  • Use explorer to replace both src / and res / folders inside workspace / SpareParts with loaded git forms
  • Click the right button in the SpareParts entry in the project tree in Eclipse β†’ Refresh
  • to use

I looked through the files and it does not seem to use an external library. If you try to build it yourself, you will still have problems due to these three classes that are not in android.jar:

 import android.app.ActivityManagerNative; //cannot be resolved import android.os.ServiceManager; //cannot be resolved import android.view.IWindowManager; //cannot be resolved 
+1
source

In Eclipse, try File-> Import ... and General-> Existing Projects in Workspace, add the project folder, and then try to compile it. Hope this helps.

0
source

All Articles