I have set up a 64 bit ubuntu env for compiling android tools (aapt, adb etc...), i'm now downloading the source code for 2.1.
I have compiled the env in the past with no problem, built emulator and stock version.
But it was all linux binaries (the sdk tools)
The more i think about it the less i understand,How i can build those tools for windows machine ? (ubuntu runs on virtual box on top of my hosting Server 2008 which is my work env).
I saw some posts related to minGW but as far as i know these are windows libraries that are meant to compile linux binaries on windows machine. I am looking for a way to compile windows binaries on linux machine.
I must say it seems impossible since i'm not sure how the linker in linux will generate an exe file, ithought of taking the .o file and try to link them under windows (VS) but i'm not sure it will work, I'll have to find compatible dlls to the API's on linux.
How do goolge create a windows SDK?
well with the help of several posts and of 'inazaruk' i managed to find the command : $ make -j PRODUCT-sdk-win_sdk showcommands dist
it compiled and in ./out/host/ i had the windows binaries. pretty cool :-) i didn't need to take them out and recompile under windows.
Hopes this helps anyone else that needs to recompile the SDK tools.
make -j8 win_sdk
also builds windows sdk.
Related
Latest version of AS and windows 7 32bit.
After some research it seems as though cmake for AS only runs on 64bit systems, if correct I assume there is no way I can just download cmake for 32bit and place it in the appropriate location in the Android SDK, or is there any other work around, I am pretty sure I will need to install windows 64bit, but thought I'd ask.
This is so I can have C++/NDK support in AS.
Yes you are correct, AS only supports 64 bit OS's to build c and c++ with cmake
I'm wondering if someone has experienced issue like me. I have two laptops in one of them has Ubuntu Linux14.04 the other one Windows OS. On Ubuntu there is android-ndk-r9c and on Windows android-ndk-r9d. ndk-build has being successful on both of them. However the windows compiled version works on android, on Linux compiled there is crash from native side. Is there any difference between Windows and Ubuntu NDKs? What can be the cause of the crash on android which uses the version of .so libs which compiled on Ubuntu Linux?
Thanks in advance..
I have downloaded both Android 4.2 source code and Android kernel source code (common) separately by following the procedure mentioned in Android website. But I am not able to get the way how to start compiling both kernel code and source code on Ubuntu 12.04. I have also downloaded the Android Emulator.
Please mention the steps required to compile.
AOSP site contains Downloading and Building guide:
http://source.android.com/source/initializing.html
You should set up your local work environment to build the Android source files. You will need to use Linux (Ubuntu in yor case) or Mac OS. Building under Windows is not currently supported.
Note: The source download is approximately 8.5GB in size. You will need over 30GB free to complete a single build, and up to 100GB (or more) for a full set of builds.
Detailed instructions for Ubuntu and MacOS you can see on AOSP site. In general you will need:
Python 2.6 -- 2.7, which you can download from http://python.org.
GNU Make 3.81 -- 3.82, which you can download from http://gnu.org,
JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download both from http://java.sun.com.
Git 1.7 or newer. You can find it at http://git-scm.com.
Note: It is also possible to build Android in a virtual machine. If you are running Linux in a virtual machine, you will need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree.
On XDA-developers you can see this Ubuntu-guide:
http://forum.xda-developers.com/showthread.php?t=2114594
I'm trying to build a package using
rake run:android
and I get the error
No such file or directory - ./apkbuilder
My project setup is given below:
rhodes-3.5.1.12
ndk version: ndk-r8b 32 bit
sdk version: android 4.2.2 API 17
I'd tried with 4.3 API 18 but it's not working.
To reach upto this point I'd copied the file aapt in to platform-tools also created a lib directory in platform-tools and put the dx.lib in it.
I'd tried with different combinations. Rhodes 3.4.2, ndk-r9 64 bit and 32 bit. Only ndk-r8 32 bit is working for me. Could anyone tell me what is the problem here?
Or a working combination of sdk, ndk and rhodes?
I've fixed the issue. Added a new answer below.
The problem of the missing apkbuilder.bat is not coming from the Android NDK but from the Android SDK. Google, in build tools r22 moved some files in different directory, breaking rhodes and a lot of other Android tools.
You've different options:
Use RhoMobile Suite v4.0
Stick to RhoMobile Suite v.2.2 downloading the latest v3.5 rhodes gem from github (using the 3-5-stable branch).
Use Android SDK build tools r21
more information are available on Launchpad, the RhoMobile community site by Motorola Solutions.
I've fixed it like this in mac os:
Use the latest versions of SDK, NDK and rhodes 4.0.0
Get rhodes like following:
git clone git://github.com/rhomobile/rhodes.git
cd rhodes
git checkout 4.0.0
gem build rhodes.gemspec
sudo gem install rhodes-4.0.0.gem
Try to build again. If still not working send me a message, I'll try my best :)
apkbuilder is deprecated.
THIS TOOL IS DEPRECATED and may stop working at any time!
current just the batch or bash script be removed
you can just create a new apkbuilder file in android-sdk-linux/tools dir
by:
window:
copy android.bat apkbuilder.bat
modify apkbuilder.bat: change com.android.sdkmanager.Main to com.android.sdklib.build.ApkBuilderMain
linux or mac:
cat android | sed -e 's/com.android.sdkmanager.Main/com.android.sdklib.build.ApkBuilderMain/g' > apkbuilder
chmod a+x apkbuilder
It seems that :
rhodes 3.5 does not support 64 bits ndk
some tools are in a different path in ndk9 and rhodes 3.5 can't find them.
So you have to stick with 32 bits and ndk8 with rhodes 3.5.
Rhodes 4 should work with 64 bits and ndk9.
as the question stated. I am planning to copy android SDK library from my microsoft windows pc to my new Mac PC. Should I download the mac version of sdk or copying the directory from windows to mac is enough ?
The SDK (Java part) is identical, but the NDK (which may also be called a part of the SDK) contains prebuilt Windows/Linux/Mac versions of the GCC compiler to produce ARM/MIPS/x86 Android executables.
To compile native native code on Mac you need different prebuilt GCC toolchain (included in NDK). That part certainly cannot be copied from Windows.
To build Java just make sure your Mac is not too old (like PowerPC) and support the Android SDK and official JDK to run Ant build scripts.
The direct copying may have one problem: the CLASSPATH variable will point to your old Windows paths, not the Mac paths.
There's no big difference, but you will need to download the SDK again. This is because not everything is Java, some of it is native code and won't work on your Mac coming from Windows. But functionally, it's identical.