Necessitas SDK for Windows pre-release.

399 views
Skip to first unread message

BogDan

unread,
Apr 12, 2011, 9:49:56 AM4/12/11
to android-qt
Hello folks,

Today, I have the privilege to introduce Ray Donnelly, the fellow
behind this fantastic port, and his priceless work, for windows users.

Ladies and Gentlemen, yes, it's true, now, thanks to Ray Donnelly,
Necessitas SDK is available also for windows platform !

Before we go further please remember that this is a pre-release
version and is not quite easy to install, we promise that with the
next Necessitas SDK release, windows platform will get an easy to use
installer, shortly Ray, will provide all informations you need to get
started with Necessitas SDK on Windows.

Best regards,
BogDan Vatra.

mingw.android

unread,
Apr 12, 2011, 9:56:53 AM4/12/11
to android-qt
Thanks for the kind words (and the great project to hack on!)

Here's the instructions. If you've already got the NDK and SDK
installed you can skip a lot of it.

1. Turn off UAC. UAC will prevent programs such as install.exe from
running, though this may not matter!

2. Download and install 7zip from http://www.7-zip.org/download.html

3. Download and install Java JDK 1.6 u24, 32bit or 64bit (if using
64bit Windows, though 32bit should also work on 64bit Windows) and set
the following environment variable:
JAVA_HOME=<where you installed Java>, e.g. C:\Program Files\Java
\jdk1.6.0_24

4. Install Google's SDK I used the .exe (http://dl.google.com/android/
installer_r10-windows.exe) and installed it to the default location (C:
\Program Files (x86)\Android). Run "SDK Manager.exe" and download the
android-4 platform (for minimum SDK testing) and android-9 (or above)
for debugging. Create an android-9 (or above) AVD too (though this can
also be done later from within Necessitas). Sometimes it falsely
reports that Java is not installed, if this happens, click back then
next again. When you exit the SDK Manager, it may tell you to add Java
to your path. If you elect to use my android.exe at stage 8, this
shouldn't matter, but you may as well.

5. Download http://prdownloads.sourceforge.net/project/gnuwin32/coreutils/5.3.0/coreutils-5.3.0-bin.zip,
unzip it and copy coreutils\bin\pwd.exe, coreutils\bin\mkdir.exe,
coreutils\bin\rm.exe, coreutils\bin\rmdir.exe and coreutils\bin
\install.exe from within to the tools subfolder where you installed
the SDK. (e.g. C:\Program Files (x86)\Android\android-sdk\tools)

6. Download http://prdownloads.sourceforge.net/project/gnuwin32/coreutils/5.3.0/coreutils-5.3.0-dep.zip,
unzip it and copy bin\libiconv2.dll and bin\libintl3.dll from within
to the same folder where you put pwd, mkdir, rm, rmdir and install.

7. Download http://mingw-and-ndk.googlecode.com/files/make-3.7z,
un7zip it and copy make.exe to the same folder.

8. Optionally (if you would like to see fewer flashing DOS boxes when
using Necessitas QtCreator) download http://mingw-and-ndk.googlecode.com/files/android-2.7z,
un7zip it and copy android.exe to the same folder. You can delete
android.bat from there if you wish.

9. Download Google's NDK r5b from http://dl.google.com/android/ndk/android-ndk-r5b-windows.zip
and unzip it into a path without any spaces in it. I used C:\android-
ndk-r5b

10. Download my new toolchain part of the NDK from
http://mingw-and-ndk.googlecode.com/files/android-ndk-toolchain-4.4.3-gdb-7.2.50-python-2.7.1-7.2.50.20110211-windows-2.7z
and un7zip it into the folder where you installed Google's NDK r5b;
Windows should prompt about overwriting folders and files, allow this
to happen (if it doesn't prompt you then you're not un7zipping it to
the right place).

11. Make a folder called C:\Necessitas and a subfolder called C:
\Necessitas\Android

12. Download http://mingw-and-ndk.googlecode.com/files/Necessitas-QtCreator-Alpha-4.7z.001
and http://mingw-and-ndk.googlecode.com/files/Necessitas-QtCreator-Alpha-4.7z.002
to the same folder (the password is tooorangeyforcrows). Un7zip
Necessitas-QtCreator-Alpha-4.7z.001 to C:\Necessitas (you should end
up with a folder called C:\Necessitas\QtCreator)

13. Download http://mingw-and-ndk.googlecode.com/files/4.7.60-mingw.7z
and un7zip it to C:\Necessitas\Android (you should end up with a
folder called C:\Necessitas\Android\4.7.60)

14. Make a directory C:\ant, then download
http://mirror.lividpenguin.com/pub/apache/ant/binaries/apache-ant-1.8.2-bin.zip
and unzip the contents of apache-ant-1.8.2 to this directory (so that
you have C:\ant\bin\ant.bat)

15. Set the following environment variables:
ANDROID_NDK_HOST=windows
ANDROID_NDK_ROOT=<where you installed NDK r5b>, e.g. C:\android-ndk-
r5b

16. Run C:\Necessitas\QtCreator\bin\qtcreator.exe and follow the Linux
instructions at: http://sourceforge.net/p/necessitas/wiki/Setup
QtCreator/ (replacing ant with ant.bat though)

17. Go to Tools->Options->Debugger, in the Source Path Mappings and
add:
Source path /opt/necessitas
Target path C:/Necessitas

18. Finally follow the Linux instructions at: http://sourceforge.net/p/necessitas/wiki/How
to write Qt apps for Android/

19. Before attempting to debug the application, go to Projects->Build
Settings and change the build configuration to the Debug one, also
check the Run Settings are what you want. To be able to debug, make
sure you set your Android target SDK: to android-9 or above (this is
in Projects->Run Settings->Package configurations).

20. Press "Start Debugging" or press f5. If you're using the emulator,
the first time you do this it's likely that the emulator won't start
up in time for QtCreator. If this happens, just press it again, as the
emulator should now be ready (or near enough ready by the time it
tries to launch your app again)

21. If you get an error "Can't copy gdbserver from..." then go to
Tools->Options->Android and make sure that Android NDK toolchain
version is set to arm-linux-androideabi-4.4.3. Other toolchains will
not work, and I've not got the time to support old software.

Note: If you at any stage use the "SDK Manager" to download and
install "Android SDK Tools, revision 10" (or any other version for
that matter), this will delete some of the programs you installed.
You'll need to redo steps 5 to 8 in this case.

If anyone has any problems with this then give me a shout.

Ray.

Andrius da Costa Ribas

unread,
Apr 12, 2011, 12:00:24 PM4/12/11
to andro...@googlegroups.com

This is wonderful :) no need to use a VM anymore... Thanks for the great work!!!

Massimo Belgrano

unread,
Apr 12, 2011, 12:42:05 PM4/12/11
to andro...@googlegroups.com
Wich is right set path for compile?

mingw android

unread,
Apr 12, 2011, 12:44:12 PM4/12/11
to andro...@googlegroups.com

Can you explain your problem? Which step of my 21 steps are you referring to?

Massimo Belgrano

unread,
Apr 13, 2011, 9:51:16 AM4/13/11
to andro...@googlegroups.com
19

somnath banik

unread,
Apr 13, 2011, 10:02:01 AM4/13/11
to andro...@googlegroups.com, Massimo Belgrano
Do you have any link to download the SDK for Windows?

On Wed, Apr 13, 2011 at 7:21 PM, Massimo Belgrano <massimo....@gmail.com> wrote:
19

Massimo Belgrano

unread,
Apr 13, 2011, 10:16:52 AM4/13/11
to andro...@googlegroups.com, Massimo Belgrano
(http://dl.google.com/android/ 
installer_r10-windows.ex
e


Intalled with default in C:\Programmi\Android\android-sdk

mingw.android

unread,
Apr 13, 2011, 10:31:51 AM4/13/11
to android-qt
> Wich is right set path for compile?

On Apr 13, 2:51 pm, Massimo Belgrano <massimo.belgr...@gmail.com>
wrote:
> 19

I'm still not sure what you are asking me:

> 19. Before attempting to debug the application, go to Projects->Build Settings and change the build configuration to the Debug one, also check the Run Settings are what you want. To be able to debug, make sure you set your Android target SDK: to android-9 or above (this is in Projects->Run Settings->Package configurations).

As you can see, no part of step 19 mentions paths or compilers.

The only paths that need to be set are:

1. Where the project lives (when you File->New file or Project) which
you are free to put wherever you want.
2. (One time only) setting up the Tools->Options->Android when you
fill in (for example!)
Android SDK location:
C:\Program Files (x86)\Android\android-sdk
Android NDK location:
C:\android-ndk-r5b
Android NDK toolchain version:
arm-linux-androideabi-4.4.3
Ant location:
C:\ant\bin\ant.bat
3. (One time only) setting up the Tools->Options->Qt4 (this is from
BogDan's page, I included a link to it rather than repeating what he
said, for this, please read "http://sourceforge.net/p/necessitas/wiki/
Setup QtCreator/"

If I can help further, please give as much detail as you can.

mingw.android

unread,
Apr 13, 2011, 10:43:13 AM4/13/11
to android-qt
All of the links are in my first post. Which SDK are you referring to?
The Google SDK or the Necessitas SDK? Either way, all the necessary
info is in the second post in this thread. I was going to copy all of
the links here again, but I'm sure you can find them yourself. The
instructions should be complete, if you follow them (and go to both of
the linked to SourceForge pages) you should have no problem.

Again, if you still need help, please give as much detail as you can.

On Apr 13, 3:02 pm, somnath banik <sbsomnathba...@gmail.com> wrote:
> Do you have any link to download the SDK for Windows?
>
> On Wed, Apr 13, 2011 at 7:21 PM, Massimo Belgrano <
>
>
>
>
>
>
>
> massimo.belgr...@gmail.com> wrote:
> > 19

mingw.android

unread,
Apr 13, 2011, 10:45:24 AM4/13/11
to android-qt
You're not giving me nearly enough details here, so what happened
after you did that? Did you enter that location into Tools->Options-
>Android->Android SDK Location? Did you also download the NDK and my
modifications to it? And then enter the NDK location into Tools-
>Options->Android->Android NDK Location?

On Apr 13, 3:16 pm, Massimo Belgrano <massimo.belgr...@gmail.com>
wrote:
> (http://dl.google.com/android/
> installer_r10-windows.ex<http://dl.google.com/android/installer_r10-windows.exe>
> e

sbsomna...@gmail.com

unread,
Apr 13, 2011, 10:55:54 AM4/13/11
to andro...@googlegroups.com, mingw.android
I need the link for nessacita sdk for windows
Sent from my Nokia phone

mingw.android

unread,
Apr 13, 2011, 11:40:48 AM4/13/11
to android-qt
All of your questions so far are answered in my first post. Here are
the all the links for Necessitas for Windows again for those of you
having trouble:

Necessitas SDK For Windows:
http://mingw-and-ndk.googlecode.com/files/4.7.60-mingw.7z

Necessitas QtCreator For Windows:
http://mingw-and-ndk.googlecode.com/files/Necessitas-QtCreator-Alpha-4.7z.001
http://mingw-and-ndk.googlecode.com/files/Necessitas-QtCreator-Alpha-4.7z.002

I'm very confused by these questions! Please re-read my first post!

On Apr 13, 3:55 pm, "sbsomnathba...@gmail.com"

Willy Gardiol

unread,
Apr 13, 2011, 11:57:44 AM4/13/11
to andro...@googlegroups.com

dont be confused...
it's just people who dont like to read. Its full of them out there...

Your post was clear and complete...

Now just waiting for the next official SDK :)

--
Willy Gardiol
wi...@gardiol.org
www.gardiol.org
www.trackaway.org -> Track YOUR way the way you want!

mingw android

unread,
Apr 13, 2011, 12:30:01 PM4/13/11
to andro...@googlegroups.com

I kinda hoped android qt might not be! So you managed to get it to work?

Anders Buus

unread,
Apr 13, 2011, 1:10:21 PM4/13/11
to andro...@googlegroups.com
I got it working by following your post, the only thing i had to do was to terminate adb.exe and let QtCreator restart it.

P.S. thanks for the effort, it works great.

mingw android

unread,
Apr 13, 2011, 1:24:43 PM4/13/11
to andro...@googlegroups.com

Great to know! Now if only gdb stepping was faster (though its the same on Linux)... I think this is the next most important issue for me to look into.

Anders Buus

unread,
Apr 13, 2011, 1:32:36 PM4/13/11
to andro...@googlegroups.com
have you though about an installer? or should I look into that, I have only created small projects with nsi scripts.

just to follow up on the last mail I also had to add includeantruntime="false" (javac part) to the main_rules.xml in the android-sdk to get it to work with the version of ant used, but I had to do this on linux as well.

mingw android

unread,
Apr 13, 2011, 1:42:58 PM4/13/11
to andro...@googlegroups.com

BogDan's had a look at the installer side of things, Nokia have a solution for that and we plan to do a complete job with it - sdk, ndk etc.. but many thanks for the offer to help. I'll put instructions up for building it on windows soon too. Not today though as I'm taking a rest. ;-)

Anders Buus

unread,
Apr 13, 2011, 1:47:56 PM4/13/11
to andro...@googlegroups.com
well deserved, sounds good with with the installer, that is clearly the best solution.

The Waswas

unread,
Apr 18, 2011, 11:40:59 AM4/18/11
to android-qt
i did it but when i run necessitas qt and try to create a project it
says no valid qt version found
Some help plz ?

The Waswas

unread,
Apr 18, 2011, 12:19:20 PM4/18/11
to android-qt
ok got everything to work but can i make it compile into simulater
because i dont have a device atm to try at ??

mingw android

unread,
Apr 18, 2011, 1:03:01 PM4/18/11
to andro...@googlegroups.com

Yes, fortunately, it's an emulator rather than a simulator, so you don't compile your code any differently (though you can't run armv7-a code on it). Set up an AVD (Android Virtual Device) and it'll use that automatically.

There are two ways of doing this, the Google way and the Necessitas QtCreator way.

Google:
run "SDK Manager.exe" from where you installed the SDK, go to Virtual Devices->New.

Necessitas QtCreator:
go to Tools->Options...->Android->AVD Manager->Add.

Anna

unread,
May 10, 2011, 11:43:33 AM5/10/11
to android-qt
I set (18 step)
qmake location C:/Necessitas/Android/4.7.60/bin/qmake.exe
when I try to build the gdb helpers, it says "make not found in PATH".
So I didn't do it.

After that I couldn't run my project because of the same reason. Then
I decided to override make to "C:/Program Files (x86)/Android/android-
sdk/tools/make.exe" in Project->Build Settings, but then I get an
error:
Packaging Error: Command 'C:\ant\bin\ant.bat debug' failed.Exit code: 1

mingw android

unread,
May 10, 2011, 12:12:52 PM5/10/11
to andro...@googlegroups.com

Hi Anna.

I think it's step 7 that you either didn't do or that didn't work, the gnu make step. Let me know if doing step 7 fixes it for you.

Anna

unread,
May 10, 2011, 12:27:45 PM5/10/11
to android-qt
I did step 7 again but I suppose it doesn't work because I get the
same error "make not found in the environment" and "make not found in
PATH". I copied make.exe to "C:\Program Files (x86)\Android\android-sdk
\tools".



On 10 май, 22:12, mingw android <mingw.andr...@gmail.com> wrote:
> Hi Anna.
>
> I think it's step 7 that you either didn't do or that didn't work, the gnu
> make step. Let me know if doing step 7 fixes it for you.

mingw.android

unread,
May 10, 2011, 12:31:45 PM5/10/11
to android-qt
Can you open a cmd.exe prompt and paste the result of:

echo %PATH%

It should have "C:\Program Files (x86)\Android\android-sdk\tools"
already, if you installed the SDK via googles .exe, however, if it
doesn't then add that to your path then restart Necessitas Qt Creator.

Anna

unread,
May 10, 2011, 1:27:40 PM5/10/11
to android-qt
Thank you! Now it finds make, but I still get an error message when I
try to run my project:

Packaging Error: Command 'C:\ant\bin\ant.bat debug' failed.Exit code:
1

mingw android

unread,
May 10, 2011, 1:28:58 PM5/10/11
to andro...@googlegroups.com

Did you install ant and Java. It may be worth going through the steps again.

Anna

unread,
May 10, 2011, 5:05:36 PM5/10/11
to android-qt
I reinstalled JDK and Android SDK and did steps 5-8 again. It finally
builds successfully but now I have another error:

Starting remote process ...
Can't find eu.licentia.necessitas.industrius.example.Test1 precess

mingw android

unread,
May 10, 2011, 5:11:54 PM5/10/11
to andro...@googlegroups.com

Try going to Projects, Run Settings

Make sure Android target SDK is set correctly in Package configurations.

Also make sure the Deploy configuration qt lib settings are correct and then rerun your app.

Reply all
Reply to author
Forward
0 new messages