How to install the Android Studio 2.2 CMake package/tool? - android

My recent Android Studio 2.2 preview 3 installation can't seem to find CMake.
I tried installing it from the SDK Tools but there's no such package...

We won't be able to support CMake (or ndk-build) on 32 bit OS because it is not supported in CLion which is the tech we use for the C++ editor. The root cause is memory\address-space limits.
Here's a helper page where I describe Android Studio C++ support including the 64 bit requirement: https://sites.google.com/a/android.com/tools/tech-docs/external-c-builds
I hope this helps!
- Jomo

Related

What is the difference between `SDK_ROOT/ndk` with `SDK_ROOT/ndk-bundle`

Android Studio Tips
I have some ndk in SDK_ROOT/ndk dir, but Android studio can't recognize them.
I have to download a new one. Is there some difference between SDK_ROOT/ndk with SDK_ROOT/ndk-bundle
"ndk-bundle" is the one that's included with Android Studio, whereas "ndk" is the standalone one
ndk-bundle is referred to as the ndk shipped as part of Android Studio.
whereas in ndk you can have any number of ndk of different version.
Doing so helps you ensure reproducible builds across projects that each depend on a specific version of the NDK.

Today's working combination of tool versions for C++ Android programming with Qt?

What is a working combination of versions of the development tools if I want to develop C++ Qt Android apps? I tried several combinations but they all fail with strange build errors of a simple Hello World test app.
Currently, I have
Qt Creator 4.2.1 (based on Qt 5.8.0, MSVC 2015, 32bit)
JDK 10.0.1
Android SDK 24.4.1-win
Android NDK r10e
Apache ant 1.9.11
but e.g. that fails with
Buildfile: build.xml does not exist!
Build failed
Warning: Android platform 'android--1' does not exist in SDK.
Building the android package failed!
-- For more information, run this command with --verbose.
21:35:44: Der Prozess "C:\EigeneDateien\bin\Qt-5.8.0\5.8\android_armv7\bin\androiddeployqt.exe" wurde mit dem Rückgabewert 14 beendet.
I want to use an open source version.
Please, give a list of tools with correct version numbers and maybe download links.
The good procedure is to use Qt's online installer (https://www.qt.io/download-qt-installer), get the latest version of QtCreator/Qt, then the latest version of ndk/sdk/jdk and cross your fingers because it does not always work...
I fighted a bt with this in early 2019 and here is a combination that perfectly works for me since then, under Windows 7 and 10.
QtCreator 4.8.0, based on Qt 5.12.0. I got it from the online installer by then and archived it, but you can apparently specifically download it from here.
NDK r18b
JDK 1.8.0_201, can be dowaloaded from this page (find jdk-8u201-windows-x64.exe)
Android SDK command line tools "sdk-tools-windows-4333796", available here. Then used sdkmanager to download API platform-tools and android-28. Try sdkmanager "platform-tools" "platforms;android-28"
No need for ant anymore, QtCreator will download and use gradle silently.

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

How to switch between android source version in Android Studio?

Currently it's not very intuitive how to switch between Android SDK source files in Android Studio while, for example, debugging or just inspecting the sources.
I've got the feeling that Android Studio, unlike IntelliJ, is getting the source's version from the compiled SDK version section of the Gradle configuration. But, this is forcing me to debug on a device which is using the same Android version when debugging. If I don't, then the sources won't be in sync with the debugger.
My question: Is there an easy way to switch between Android sources in Android Studio without having to change the configuration in build.gradle?
Try this:
mv $ANDROID_HOME/sources/android-21 $ANDROID_HOME/sources/android-21-orig
cp $ANDROID_HOME/sources/android-17 $ANDROID_HOME/sources/android-21
Restart android studio so it will pick up the correct paths.
Debug
NodeJS program to easily switch the Android SDK Sources which Android Studio attaches when debugging.
I think studio grabs the Android SDK platform source from the targetSDKVersion.
It's wise to update the targetSDKVersion to the latest Android platform SDK from your SDK manager.
It's better for development if your project constraints you from increasing the targetSDKVersion grab the platform SDK your project mentions.
Android platform SDK's

Android Eclipse and configuring NDK Toolchains for project

I am using Android Eclipse ADT on Windows 8.1
I have installed both Cygwin and MinGW.
I have installed the SDK, NDK and Cocos2d-x library.
My question is that my Cocos2d-x project is expecting this toolchain library in the NDK:
ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt\darwin-x86\lib\gcc\arm-linux-androideabi\4.4.3\include
I browse to the ndk\toolchains folder and I see several other versions:
arm-linux-androideabi-4.6
arm-linux-androideabi-4.8
arm-linux-androideabi-clang3.3
And a few other versions, but not the 4.4.3 version.
My question is then, should I
1) With Cygwin or MinGW compile "arm-linux-androideabi-4.4.3" and how to do this.
or -
2) With some setting in ADT should I change the version to the newest one "arm-linux-androideabi-4.8". Please direct me to this setting if this is the correct choice.
Thanks in advance for your help!
EDIT More importantly than trying to put the right NDK in there, it clearly states, "Invalid project path: Include path not found (C:\development\lib\android\ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt\darwin-x86\lib\gcc\arm-linux-androideabi\4.4.3\include)"
If that was a Visual Studio error I would look for where the Project Path is being defined. Why can't I do that with Eclipse ADT?
It seems to me that you need a compiled arm-linux-arndroideabi-4.4.3 toolchain.
You can download the ndk-r8e toolchain with a compiled arm-linux-arndroideabi-4.4.3 from the following link:
32-OS: https://dl.google.com/android/ndk/android-ndk-r8e-windows-x86.zip
64-OS: https://dl.google.com/android/ndk/android-ndk-r8e-windows-x86_64.zip
Extra the zip file, you'll find android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt
Hope that helps.

Categories

Resources