构建Android系统应用程序的简单方法?(例如日食) [英] Easy way to build Android system app ? (Eclipse for example)

查看:29
本文介绍了构建Android系统应用程序的简单方法?(例如日食)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我是否有一种简单的方法可以为 Android 构建系统应用?

Can somebody tell me if there is a simple way to build system apps for Android?

自从 ICS 4.0.3 发布并开源后,一些替代启动器开始推出,例如 投石机Nova Launcher.它显然基于系统启动器,我想知道他们是怎么做到的.

Since ICS 4.0.3 is out and open source, severals alternative launchers start rolling out like Trebuchet or Nova Launcher. It's obviously based on the system launcher and I wonder how they did this.

如果您克隆启动器:

git clone https://android.googlesource.com/platform/packages/apps/Launcher2.git

尝试在Eclipse中打开它,它不会工作,因为它使用了SDK中不存在的一些类和变量,只存在于整个框架中.

and try to open it in Eclipse, it won't work because it use some classes and variable not present in the SDK, only present in the entire framework.

有没有办法构建或获取它并将其添加到 Eclipse(例如 SDK 的 android.jar)并使用 Eclipse 构建 Launcher?如果没有,有人可以告诉我一个很好的教程来使用命令行执行此操作吗?

Is there a way to build or get it and add it into Eclipse (like android.jar for the SDK) and build the Launcher using eclipse? If no, can somebody indicates me a good tutorial to do this usong command line?

推荐答案

有没有办法构建或获取它并将其添加到 Eclipse(如 SDK 的 android.jar)并使用 eclipse 构建启动器?

Is there a way to build or get it and add it into Eclipse (like android.jar for the SDK) and build the Launcher using eclipse ?

没有

如果没有,有人可以告诉我一个很好的教程来使用命令行执行此操作吗?

If no, can somebody indicates me a good tutorial to do this usong command line ?

您也不能从命令行执行此操作.

You cannot do that from the command line, either.

要将 AOSP 应用程序转换为独立的 SDK 应用程序,您需要找到所有SDK 中不存在的类和变量"并删除/替换对它们的引用.最简单的方法是删除对它们的引用,如果应用程序仍会以减少的功能运行.对于对内部资源的引用,您可以简单地将它们复制到您的项目并修改 R 值以指向您的本地副本.欢迎您检查SDK 中不存在的类和变量"并确定您也可以复制它们(将它们重构为新包),在这种情况下,您将更新您的项目以引用复制和重构的类.

To convert an AOSP application into a standalone SDK application, you will need to find all the "classes and variable not present in the SDK" and remove/replace the references to them. The simplest is to remove the references to them, if the app will still run with reduced functionality. For references to internal resources, you can simply copy those to your project and modify the R values to point to your local copy. You are welcome to examine the "classes and variable not present in the SDK" and determine that you can copy those as well (refactoring them into a new package), in which case you would update your project to refer to the copied and refactored classes.

这篇关于构建Android系统应用程序的简单方法?(例如日食)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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