Qt does not detect Android NDK - android

I want to develop Android apps with Qt. I have Extracted the Android SDK and NDK to C:\. This is the NDK I downloaded:
https://squeak-android-vm.googlecode.com/files/android-ndk-1.6_r1-windows.zip
But Qt 5.2.1 does not detect the NDK and this error is shown:
"C:\android-ndk-1.6_r1" does not seem to be an Android NDK top folder.
Do I downloaded a wrong NDK? Did I miss something?
Thanks

First of all I strongly recommend to install the latest version of Qt for Android (5.4.1 at present). Also you should download and install Android SDK (ver. 22+) and NDK (ver. r9+) from here.
After downloading extract them. For Android SDK you should have a connection to Internet and download the desired tools. you have to install at least Android API-13! You should also install Android SDK Platform-tools and Android SDK Build-tools.

I had the same problem. The problem was I first created a Android NDK folder to extract the Android NDK files into it. The extraction procession then created a sub folder of the same name. To solve the problem, I moved the sub folder one directory level up and deleted the initial Android NDK folder I first created.

Related

Unity cannot find Android SDK on Windows

I installed Android Studio (3.6.2) along with Android SDK, but when I choose its folder in Unity (Edit -> Preferences -> External Tools), it says "Unable to detect SDK in the selected directory." What do I have to do to make it work? I use Unity 2018.4 (LTS) on Windows 10.
Unity seems to have trouble with folder structure of SDK installed with Android Studio. It seems it expects command line tools to contain folder called tools, but Android Studio stores those in cmdline-tools\latest. Assuming the SDK is installed in C:\Users\{username}\AppData\Local\Android\Sdk you have to do the following:
Copy folder C:\Users\{username}\AppData\Local\Android\Sdk\cmdline-tools\latest to C:\Users\{username}\AppData\Local\Android\Sdk\
Rename latest to tools
In the end you should have a folder called C:\Users\{username}\AppData\Local\Android\Sdk\tools present. It should contain bin and lib folders. When you choose Sdk folder in Unity, it processes it and you should be able to build Android apk.
I have no idea if this is the right approach, but we were able to make Android builds work on Windows following these steps.

How to update Android NDK in place?

I used to download the Android NDK as new version were pubished to the devloper website.
It appears Google has recently updated the developer website and removed direct NDK download links, and replaced them with a a bunch of circular references that eventually lead to the SDK download. The SDK download page does not include the NDK. The closest I have found to a download and NDK is Download Android Studio and SDK Tools.
Running $ sudo /opt/android-sdk-macosx/tools/android does not offer a way to update the NDK.
How do I update the NDK in place using the existing NDK or one of the SDK tools?
Or where is the download of the actual NDK located?
To be clear, I use ant and ndk-build from the command line. I don't use Eclipse or Android Studio. Eclipse and the Android plugin is broken; and Android Studio does not really support NDK and JNI.
Plus, I don't really want to learn another editor since I kind of know Eclipse, and I know already how to do it from the command line (so there's no need for an editor).
In Android Studio, go to Tools (top-menu item) > Android > SDK Manager
Click SDK Tools tab
Scroll down and you will see NDK as an option, with detail if an update is available

Creating Android App

I'm installing qt-everywhere-opensource-src-5.2.1.zip for windows and I want to be able to use this to create an Android app using Visual Studio 2010. Am I going about this the right way? Will this version of Qt work for an Android app and is it ok to use Visual Studio 2010 for this kind of thing? I'm coding in C++.
Thanks
You should download and install:
Qt 5.x here.
Android SDK (ver. 22+) here
NDK (ver. r9+) here
If you don’t plan to create Android Java apps, then make sure you are downloading ONLY the SDK and not ADT Bundle or Android Studio.
After downloading extract them, open Android SDK (you should have a connection to Internet) and download the desired tools, you have to install at least Android API-13! You also must install Android SDK Platform-tools and Android SDK Build-tools.
Open Qt Creator. Goto Tools->Option->Android settings page and set Android SDK and NDK locations.

Android SDK installation (adt-bundle-windows-x86_64-20131030)

I have Win7-64 laptop, installed JDK, Eclise is working. I am failing to install the Android SDK. I downloaded 'adt-bundle-windows-x86_64-20131030' from developer.android. When I used SDK Manager, i could select required installation components and it shows as complete. However, I dont see anything in the 'All Programs'. I also dont see any plugin (that I was supposed to see) in the Eclipse as well. So I gather I am missing some step. Can anyone help. Pl see![][1]
Your downloaded sdk files may not shown in All Programs as they are not executable nor meaningless to be clickable.
Sometimes many folks got a problem to point out exact SDK path, so more than one SDK binaries are downloaded. I think your eclipse cannot find sdk path properly.
To find out where the SDK path is, it displays in SDK Manager.
Then, you can set the path in Eclipse Eclipse->Window->Preferences-> select Android from left hand menu. Check SDK Location has same path; see screenshot.
FYI, as downloaded files are just a bunch of binaries used only for Android development, you can copy the whole android-sdk folder to other place.
I personally recommend to change the directory to C:\Android or C:\User\<me>\Documents\Android-sdk as default directory is in C:\Users\<me>\AppData\Local hidden folder.
The ADT bundle includes an Eclipse executable fully configured with the Android SDK tools. It does not add a plugin to an existing Eclipse install. To launch ADT/Eclipse goto . Search for eclipse.exe within that directory. This is the executable you need to launch.
On my Mac, the Eclipse executable is in /Applications/adt-bundle-mac-x86_64/eclipse/Eclipse.app/Contents/MacOS/eclipse. Just a guess, but on Windows, the path will probably look something like adt-bundle-windows-x86/eclipse/Eclipse.app/Contents/windows/eclipse.exe
I would personally suggest to use Android Studio 2.1 for easy install of plugins as whenever there is an update to any platform tools or build tools they are readily available and the dependency injection is far better with the build tools such as Gradle which are bundled with the Android Studio .
Android Studio
Android adt is plugin to use Android SDK in Eclipse IDE. You have SDK you have Eclipse now you need to install adt plugin in eclipse to use your SDK.
You can refer Android developers for plugin installation
https://stuff.mit.edu/afs/sipb/project/android/docs/sdk/installing/installing-adt.html#Download
For "I dont see anything in the 'All Programs' I also dont see any plugin" part you will not see any extra program installed in your system as adt is extension of eclipse. When you will have adt in place you should be able to see Android option in eclipse preferences. You should also be see Android APplication option while creating new project.

From where to download pure Android SDK without ADT?

I am googling like a mad but I am unable to find out from where I should download basic Android SDK zip (tar.gz).
I was used to download that zip, extract it and that's it. Now all what is offered to me is some weird Android ADT "bundle" which goes with some Eclipse x.y.z I am not totally interested into. I just need pure android-sdk with all these binaries for creating emulators and stuff from the command line. I do not want any bundled IDE. Right now, what I get in one zip is:
Eclipse + ADT plugin <-- I do not want this at all
Android SDK Tools
Android Platform-tools
The latest Android platform
The latest Android system image for the emulator
Go to this site and click on Using an existing IDE. There is the Android SDK.

Categories

Resources