如何在新平台上编译/构建 android aapt?

发布于 2024-11-07 04:17:51 字数 597 浏览 0 评论 0 原文

我想为 debian amd64 平台重新编译 android aapt 。我们可以有 源代码 但我不明白如何编译它。有一个类似的makefile(Android.mk),它似乎不完整并且依赖于其他文件。

build.git/core。我需要获取所有 android 源代码才能仅重新编译 aapt 吗?我宁愿只重新编译这个工具,但如果我需要编译完整的 sdk,请告诉我。任何帮助将不胜感激。

谢谢

I'd like to recompile android aapt for debian amd64 platform. We can have the source code on git but I don't understand how to compile it. There is a simili makefile (Android.mk) which seems not to be complete and dependant to others.

There is a Makefile in build.git/core. Do i need to get all the android source code to recompile only aapt ? I'd prefer to only recompile this tool but if I need to compile complete sdk, tell me. Any help would be appreciate.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

计㈡愣 2024-11-14 04:17:51

第 1 步:按照此处的说明获取 Android 源代码: https://source.android.com/setup/构建/下载

第 2 步:设置环境:source build/envsetup.sh

这会向您的环境添加许多有用的命令。

在这里阅读更多信息:https://source.android.com/setup/build/building

步骤 3:运行 mmm /frameworks/base/tools

这将有选择地构建所有工具,包括 aapt 及其依赖项。这比在 Android 中构建所有内容要快得多。

自从提出这个问题以来,aapt 已被 aapt2 取代。在 Linux 上构建时,二进制文件将位于 out/soong/host/linux-x86/bin/aapt2 中。将 linux-x86 替换为您的操作系统。

Step 1: Get android source following instructions here: https://source.android.com/setup/build/downloading

Step 2: Setup environment: source build/envsetup.sh

This adds a number of useful commands to your env.

Read more here: https://source.android.com/setup/build/building

Step 3: Run mmm /frameworks/base/tools

This will selectively build all the tools, including aapt as well as it's dependencies. This is much faster than building everything in android.

Aapt has been replaced by aapt2 since this question was asked. The binary will be located in out/soong/host/linux-x86/bin/aapt2 when building on Linux. Replace linux-x86 with your os.

ぺ禁宫浮华殁 2024-11-14 04:17:51

我编译了一次代码。
下载完代码后,请按照以下构建说明进行操作:
android 源站点 基本上运行 。 build/envsetup.sh

$ 午餐全英

然后简单

$ 制作

将构建所有内容,包括工具。
如果我没记错的话, make sdk 仅用于构建 sdk,但我不确定它是否仍然适用
问题是它不是 amd64' 那是最热门的输出最有可能仍然是 linux32,我自己不知道的问题是如何交叉构建其他平台,例如我知道的 win32\win64\mac\linux64确保支持 win32\mac。

i compiled the code once.
Once you have finished downloading the code follow the build instruction under:
android source site which are basically run . build/envsetup.sh and

$ lunch full-eng

and then simple

$ make

which will build everything including the tools.
If i'm not mistaken make sdk used to build the sdk only, but i'm not sure if it's still applies
The issue is that it's not amd64' that's the hot the output most likly will still be linux32, the question i don't know myself is how to cross build for other platform such as win32\win64\mac\linux64 out of them i know for sure that win32\mac are supported.

因为看清所以看轻 2024-11-14 04:17:51

按照汤姆·阿恩的方式去做:
https://code.google.com/p/java-ide-droid /source/checkout

aapt 源代码本身(没有整个 android 源代码)在这里:http://java-ide-droid.googlecode.com/svn/trunk/jni/aapt/

他对原始源的修改位于自述文件中。

Do it Tom Arn's way:
https://code.google.com/p/java-ide-droid/source/checkout

The aapt source code, all by itself (without the entire android source)is here: http://java-ide-droid.googlecode.com/svn/trunk/jni/aapt/

His modifications to the original source are in the README.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文