Reduce size of installed ndk-bundle - android

I have install ndk-bundle from sdkmanager. The ndk-bundle taking around 4.2GB.
The bundle has tools chains for different architectures and platforms. Is there a way to just install tool-chain for one particular platform and architecture? I would like to install only arm and aarch64 toolchains as part of ndk and for any one android-{} platform.

There's no supported way to do this. You could try deleting the directories in $NDK/toolchains that aren't llvm, but no guarantee that won't break things.

Related

how to find that the Android app is 32bit or 64bit

I am new to android. And i don't know how to get the info about android apps.
Can anyone please suggest that how one can find that the android app running is 32bit or 64 bit?
Thanks
APKs are not 32-bit or 64-bit. NDK binaries (.so files) inside of APKs will be compiled for specific CPU architectures. Generally, 32-bit binaries should work fine on 64-bit CPUs.
APK is ZIP. You can open it and check directory lib to see which architectures are supported. If there is no directory lib, it supports all architectures.
https://developer.android.com/ndk/guides/abis.html

Is the any way to install cmake for Android studio on a 32bit system to allow C++ support?

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

What is the dif between mac and windows about android SDK

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.

which java jdk to use?

I'm on the stage of learning java, and I have the following question. On a new machine withj CPUi5, 8GB RAM and Win7 x64, which version of JDK to install? Do I install x86 or x64 version?
Also, when is about to install Eclipse, which version is recomended for my case? x86 or x64?\
After some weeks of practicing with Java, I plan to go to Adroid dev.
Many thanks!
You can choose x86 in both cases. There is no need for x64 when doing Android development.
See also Why should I use the 64-bit JDK over the 32-bit version?
If you're running a 32 bit Operating System, a 64 bit JDK or eclipse simply won't work.
If your OS is 64bit then it does not really matter, but you have to choose the same for both eclipse and the JDK because eclipse uses native libraries and you cannot mix 32 bit and 64 bit code in the same process.
I'd recommend you to install x64 bit JDK and Eclipse x64. Android is developed based on x64 JDK. This can be a reason to choose this version.
Just to remember you that you have to install only JDK 5 or JDK 6 versions. In other case you'll have problems with Android SDK.
You say you have Win7 x86, if that is really the case then you have no option and need to use a 32-bit JDK. If you have Win7 64 bit then you can use either 32 or 64 bit. In my experience it doesn't matter which one you choose as long as you install the same Eclipse version.
Your operating system is 32 bit so install 32 bit java and eclipse is not a problem for 32 bit or 64 bit.

Compiling android tools for windows

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.

Categories

Resources