如何导入Android的邮件源$ C ​​$ C到Eclipse项目? [英] How to import android email source code into eclipse project?

查看:164
本文介绍了如何导入Android的邮件源$ C ​​$ C到Eclipse项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从<下载的android的电子邮件应用程序源$ C ​​$ C [2.2版] href="http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=tree;h=1428055a409641d909f07d0dbc9d8023fd8da901;hb=9031e67b7e2ec00033a45155ff644fccb33e6bc7"相对=nofollow> 此处 。我删除了的.classpath和.project文件,这样我就可以导入现有的Andr​​oid项目。一切似乎已经奏效。不过,我得到了不少重复的错误,如:

I downloaded the android Email app source code [version 2.2] from here. I deleted the .classpath and .project file so that I could import an existing android project. Everything seems to have worked. However, I get quite a few recurring errors such as:

与会者不能被解析为   变量

Attendees cannot be resolved to a variable

android.provider.Calendar不能   解析为一个变量

android.provider.Calendar cannot be resolved to a variable

日历不能被解析为   变量

Calendar cannot be resolved to a variable

我已经设置了正确的android版 2.2 ,我缺少什么?

I have set the correct android version 2.2, what am I missing?

谢谢大家的帮助

推荐答案

许多包括应用程序不能(或至少不能)被与SDK内置的,因为它们依赖于非出口的功能(编辑),它是唯一的可见在系统构建。我不知道,如果电子邮件仍然是这一类,但它是在蛋糕天。

Many of the included applications cannot(or at least could not) be built with the SDK, as they depend(ed) on non-exported functionality that is only "visible" during the system build. I'm not sure if Email is still in this category, but it was in the cupcake days.

有三种可能的解决方法。最好是重写应用程序,而不是使用功能,其出口在SDK的部分,因而相当稳定。

There are three potential workarounds. Best is to rewrite those parts of the application to instead use functionality which is exported in the SDK, and thus fairly stable.

接下来是使用反射来收拾缺少的部分在运行。

Next up is to use reflection to pick up the missing pieces at runtime.

最后是要什么也不做虚拟类所需的非公共平台作品,你的项目中。这些都足以让程序编译,并在运行时,他们被拒绝是由于名称冲突与隐藏的系统功能,所以你最终利用真正的类,而不是傻瓜。

Last is to make do-nothing dummy classes for the needed non-public platform pieces, within your project. These are enough to let the program compile, and at runtime they get rejected due to name collisions with the hidden system functionality, so you end up utilizing the real classes rather than the dummies.

正确的做法是建立与平台构建系统的应用,而不是SDK。

The proper thing to do is to build the application with the platform build system, rather than the SDK.

这篇关于如何导入Android的邮件源$ C ​​$ C到Eclipse项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆