1

据我了解,所有内置的标准应用程序(如电子邮件、音乐、日历等)都是使用相同的 API 构建的。所以我应该能够导入邮件/音乐等项目,而无需查看 android 的完整源代码库。我一直在尝试,但是我遇到了诸如类解析失败之类的编译问题。

我做错了吗?我是否必须获得完整的 android 源项目才能导入像 Mail 这样的项目?

4

2 回答 2

1

这些应用程序是开源的(邮件、音乐和日历)。但它们依赖于内部类和资源,无法使用 SDK 编译

于 2010-07-12T09:21:04.417 回答
0

You could pull a Git clone of some particular app. For example - the EMail app from

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

The first problem is that Google are using MK files for building inside their android projects and Eclipse do not use them. But you can compile it because you have the sources, the XML resources and the manifest also. The second problem is to deal with the dependencies. For example the gallery app may depend on few camera classes. You can manually copy them to your project.

Other way is: Using Eclipse for writing code and testing if it builds correctly and using GNU Make 3.82 from http://www.gnu.org tool that will build the supplied Android.MK file and run the app.

于 2012-10-03T09:19:09.693 回答