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

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

问题描述

有人可以告诉我有没有一个简单的方法来构建Android的系统应用程序?



由于ICS 4.0.3是开源的,所以替代启动器开始像 Trebuchet Nova Launcher 。这显然是基于系统启动器,我不知道他们是如何做到的。



如果克隆启动器:

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

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



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

解决方案


是有一种方法来构建或获取它并将其添加到Eclipse中(如SDK的android.jar),并使用eclipse构建Launcher?



如果没有,有人可以告诉我一个很好的教程来做这个usong命令行吗?


您也无法从命令行执行此操作。



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


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

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.

If you clone the launcher:

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

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.

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?

解决方案

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 ?

No.

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

You cannot do that from the command line, either.

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系统应用程序的方法? (例如Eclipse)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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