I am trying to get a specific package (Launcher2) from the google git repo and compile it. Planning on changing a few things and create a custom one.
After installing git i used this to get the source from the tag of the 2.2 sdk:
git clone https://android.googlesource.com/platform/packages/apps/Launcher2 launcher2
git checkout android-sdk-2.2_r2
After all done and the files exist, I am creating a new android project in eclipse and choosing the 2.2 target framework and marking the “use existing source”. The project is opening but with many compilation errors like invalid imports and unrecognized fields and so on …
It looks like the source I have does not match the framework.
What am I missing?
if you want to compile in Eclipse, you will not be able.
Because it uses internal classes (com.android.internal.*) and private APIs.
See Launcher 1 (until android 2.1) : http://code.google.com/p/android-launcher-for-sdk/
Otherwise, you can have a look on the source code of ADW Launcher 2 which is based on Launcher2. You will see the modification made to be compliant with the public APIs