Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

(Difference between revisions)

Qt apps on Nokia X

From Wiki
Jump to: navigation, search
tbr23 (Talk | contribs)
(Tbr23 -)
BuildNokia (Talk | contribs)
(BuildNokia - edited for clarity)
Line 26: Line 26:
 
== Introduction ==
 
== Introduction ==
  
It's a pleasant surprise how easy it is to get Qt SDK working with Nokia X, at least as tried on Linux. Other users report successful setup on OSX and Windows following the below instructions as general guidance.
+
It's a pleasant surprise how easy it is to get the Qt SDK working with Nokia X, at least as tried on Linux. Other users report successful setup on OS X and Windows following the instructions below as general guidance.
  
 
== Summary ==
 
== Summary ==
Line 33: Line 33:
 
http://qt-project.org/doc/qt-5/androidgs.html
 
http://qt-project.org/doc/qt-5/androidgs.html
  
Note though, that it does not tell you which Targets to install using the sdk updater. At the time of writing this is API Level 16 in case of Nokia X (aka Android 4.1.2).  
+
Note though, that it does not tell you which targets to install using the SDK Updater. At the time of writing this is API Level 16, in the case of Nokia X (aka Android 4.1.2).  
  
 
[[File:Android_SDK_target_selection.png]]
 
[[File:Android_SDK_target_selection.png]]
  
Make sure you not only install the Java JRE, but also the JDK. In case of Ubuntu 14.04:
+
Make sure you install both the Java JRE and the JDK. To do this on Ubuntu 14.04, run:
 
<code>sudo apt-get install openjdk-7-jdk openjdk-7-jre ant</code>
 
<code>sudo apt-get install openjdk-7-jdk openjdk-7-jre ant</code>
  
In Qt Creator you will need to fill in some paths, the picture is just an example:
+
In Qt Creator you will need to fill in some paths.  You can use the example below for guidance.
  
 
[[File:Qt_Creator_Android_options.png]]
 
[[File:Qt_Creator_Android_options.png]]
  
 +
You can either create a new QML project in QtCreator, or you can download the [[File:Hello-world.tar.gz| tarball of it]], already configured for Nokia X.
  
You can either create a new QML project in QtCreator or you can download the tarball of it [[File:Hello-world.tar.gz| tarball of it ]], ready configured for Nokia X.
+
If you create a project from scratch using the wizard, make sure you select the right kit:
 
+
If you create a project from scratch using the wizzard, make sure you select the right kit:
+
  
 
[[File:New-qml-app-kit-selection.png]]
 
[[File:New-qml-app-kit-selection.png]]
  
Also once created go to project config and make sure that the API level is configured correctly for Nokia X ("android-16", as of 2014-04-13).
+
Once you create the project, go to the project config and make sure that the API level is configured correctly for Nokia X ("android-16", as of 2014-04-13).
  
 
[[File:Build-api-level-config.png]]
 
[[File:Build-api-level-config.png]]
  
 
=== Deploying to your Nokia X ===
 
=== Deploying to your Nokia X ===
Make sure "adb devices" lists your Nokia, when it's in developer mode and connected over USB. If not add "0x0421" to your adb_usb.ini and restart adb server.
+
Make sure "adb devices" lists your Nokia, when it's in developer mode and connected over USB. If not add "0x0421" to your adb_usb.ini and restart the adb server.
  
 
If you got that right, after pressing the green "run" button on the bottom left you should be presented with this dialogue:
 
If you got that right, after pressing the green "run" button on the bottom left you should be presented with this dialogue:

Revision as of 18:26, 17 April 2014

Note.pngNote: This is an entry in the Nokia X Wiki Challenge 2014Q1

This article explains how you can easily develop applications for NokiaX using Qt

Article Metadata
Tested with
Devices(s): Nokia X, Nokia X+, Nokia XL
Dependencies: Qt5.2.1 with Android components
Article
Created: tbr23 (17 Apr 2014)
Last edited: BuildNokia (17 Apr 2014)

Contents

Introduction

It's a pleasant surprise how easy it is to get the Qt SDK working with Nokia X, at least as tried on Linux. Other users report successful setup on OS X and Windows following the instructions below as general guidance.

Summary

The Qt documentation does a mostly good job at explaining its side of the setup: http://qt-project.org/doc/qt-5/androidgs.html

Note though, that it does not tell you which targets to install using the SDK Updater. At the time of writing this is API Level 16, in the case of Nokia X (aka Android 4.1.2).

Android SDK target selection.png

Make sure you install both the Java JRE and the JDK. To do this on Ubuntu 14.04, run:

sudo apt-get install openjdk-7-jdk openjdk-7-jre ant

In Qt Creator you will need to fill in some paths. You can use the example below for guidance.

Qt Creator Android options.png

You can either create a new QML project in QtCreator, or you can download the File:Hello-world.tar.gz, already configured for Nokia X.

If you create a project from scratch using the wizard, make sure you select the right kit:

New-qml-app-kit-selection.png

Once you create the project, go to the project config and make sure that the API level is configured correctly for Nokia X ("android-16", as of 2014-04-13).

Build-api-level-config.png

Deploying to your Nokia X

Make sure "adb devices" lists your Nokia, when it's in developer mode and connected over USB. If not add "0x0421" to your adb_usb.ini and restart the adb server.

If you got that right, after pressing the green "run" button on the bottom left you should be presented with this dialogue: Build-deploy-dialogue.png

Version Hint

Windows Phone: [[Category:Windows Phone]]
[[Category:Windows Phone 7.5]]
[[Category:Windows Phone 8]]

Nokia Asha: [[Category:Nokia Asha]]
[[Category:Nokia Asha Platform 1.0]]

Series 40: [[Category:Series 40]]
[[Category:Series 40 1st Edition]] [[Category:Series 40 2nd Edition]]
[[Category:Series 40 3rd Edition (initial release)]] [[Category:Series 40 3rd Edition FP1]] [[Category:Series 40 3rd Edition FP2]]
[[Category:Series 40 5th Edition (initial release)]] [[Category:Series 40 5th Edition FP1]]
[[Category:Series 40 6th Edition (initial release)]] [[Category:Series 40 6th Edition FP1]] [[Category:Series 40 Developer Platform 1.0]] [[Category:Series 40 Developer Platform 1.1]] [[Category:Series 40 Developer Platform 2.0]]

Symbian: [[Category:Symbian]]
[[Category:S60 1st Edition]] [[Category:S60 2nd Edition (initial release)]] [[Category:S60 2nd Edition FP1]] [[Category:S60 2nd Edition FP2]] [[Category:S60 2nd Edition FP3]]
[[Category:S60 3rd Edition (initial release)]] [[Category:S60 3rd Edition FP1]] [[Category:S60 3rd Edition FP2]]
[[Category:S60 5th Edition]]
[[Category:Symbian^3]] [[Category:Symbian Anna]] [[Category:Nokia Belle]]

293 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×