kruz05
kruz05

Reputation: 531

How I can build APK package for Qt/Android app in QtCreator/Necessitas?

I try to create Android application from Qt sources in QtCreator with Necessitas. When I select "Build" only compilation and linking to .so was performed. When I select "Deploy " the APK package was created and it's tried to be loaded to device, but I only need to build the complete signed APK (like "Export Android App" in Eclipse). Also I want to build all targets in one step - armv5/armv7a Debug /Release, but the "Build All" command somehow only currently selected target.

Upvotes: 1

Views: 7665

Answers (3)

landrew
landrew

Reputation: 61

The answer above addresses the first question. As far as I know, you have to build your targets one at at time through Qt Creator, although you may be able to write a script to build all at once.

Upvotes: 0

rocky
rocky

Reputation: 11

you can sign apk file from Qt creator

  1. GOTO PROJECT TAB in left navigation menu
  2. From the options available Click on Android Build||Run
  3. Sign Package --> Keystore--> You can create directly or import an existing certificate from keystore

Upvotes: 0

Luca Carlon
Luca Carlon

Reputation: 9986

I'm not aware of any way to do this from Qt Creator. Anyway you can create a script to do that. I never tried this but it might actually work. With ANDROID_TARGET_ARCH you can switch between archs (look into the mkspec). Once you have your libraries you can place those into your android/lib directory according to arch. Once you did that, you can go in your android project directory (/android) and use ant debug to build the package.

You might also want to add such a script as a Qt Creator's build step to do it automatically when building.

Upvotes: 2

Related Questions