how to compile/build android aapt on new platform?
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 t开发者_运维知识库o only recompile this tool but if I need to compile complete sdk, tell me. Any help would be appreciate.
Thanks
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.
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.
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.
精彩评论