0

I downloaded the project folder from :

https://android.googlesource.com/platform/packages/apps/Gallery2/

For some reason, when I opened it into my Eclipse environment, it is not compiling and it shows a lot of broken references. I am attaching screenshot for your reference:

enter image description here

Any ideas if I am doing something wrong or the code itself has issues?

Lost
  • 12,007
  • 32
  • 121
  • 193

2 Answers2

2

This is a platform package, not a stand alone 3rd party package. It uses classes which are part of the platform, but not the Android SDK. It's built with the platform as a whole using make rather than Eclipse and ultimately is in the ROM (i.e. flash image.) You won't be able to build it with Eclipse and try to deploy it.

Larry Schiefer
  • 15,687
  • 2
  • 27
  • 33
  • If I can not build it in Eclipse, is there any way to compile it otherwise? also if the code is not build-able then I would guess that Google posts it just for reference and nothing else? – Lost Feb 18 '14 at 20:02
  • If I can not compile this aplicaiton then does it mean that if someone wants to extend the code of Gallery application by adding their own code, I am assuming they might need to compile it first and then go ahead and change the code. How would they achieve that? – Lost Feb 19 '14 at 02:02
  • Since this is a platform package, it cannot easily be built with Eclipse. It relies on packages/APIs which are part of the platform, which are different than the ones considered "public" Android APIs which are rolled into the Android SDK. In order to extend it as a stand alone app, you'd have to remove the platform API dependencies and replace them with your own implementation or a public SDK equivalent. Hope that helps. – Larry Schiefer Feb 19 '14 at 13:41
1

Many of Android's core apps depend on internal system APIs that are not available in the standard SDK that developers compile against. You can find some more information from this question.

Community
  • 1
  • 1
NasaGeek
  • 2,138
  • 1
  • 15
  • 19