3

I am using Qt 5.13 with Qt Creator 4.9.2. I can successfully build the Debug version of my application for Android, but when I try to compile the Release version I get:

16:57:35: The process "/opt/Qt/5.13.0/android_armv7/bin/androiddeployqt" exited with code 15. Error while building/deploying project Notizie2 (kit: Android for armeabi-v7a (Clang Qt 5.13.0 for Android ARMv7)) When executing step "Build Android APK"

I am not even sure where to begin to fix this, there are no errors other than this in the compilation log. This are the ending output of the comilation log:

    BUILD SUCCESSFUL in 6s
    30 actionable tasks: 2 executed, 28 up-to-date
    Verifies
    Verified using v1 scheme (JAR signing): true
    Verified using v2 scheme (APK Signature Scheme v2): true
    Verified using v3 scheme (APK Signature Scheme v3): true
    Number of signers: 1
    WARNING: META-INF/androidx.appcompat_appcompat.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.arch.core_core-runtime.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.asynclayoutinflater_asynclayoutinflater.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.browser_browser.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.coordinatorlayout_coordinatorlayout.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.core_core.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.cursoradapter_cursoradapter.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.customview_customview.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.documentfile_documentfile.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.drawerlayout_drawerlayout.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.fragment_fragment.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.interpolator_interpolator.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.legacy_legacy-support-core-ui.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.legacy_legacy-support-core-utils.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.lifecycle_lifecycle-livedata-core.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.lifecycle_lifecycle-livedata.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.lifecycle_lifecycle-runtime.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.lifecycle_lifecycle-viewmodel.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.loader_loader.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.print_print.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.slidingpanelayout_slidingpanelayout.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.swiperefreshlayout_swiperefreshlayout.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.vectordrawable_vectordrawable-animated.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.vectordrawable_vectordrawable.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.versionedparcelable_versionedparcelable.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/androidx.viewpager_viewpager.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    WARNING: META-INF/proguard/androidx-annotations.pro not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    18:02:50: The process "/opt/Qt/5.13.0/android_x86/bin/androiddeployqt" exited with code 15.
    Error while building/deploying project Notizie2 (kit: Android for x86 (Clang Qt 5.13.0 for Android x86))
    When executing step "Build Android APK"

Also these lines look suspicious:

> Task :checkReleaseLibraries
Task ':checkReleaseLibraries' is not up-to-date because:
  No history is available.
:checkReleaseLibraries (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.0 secs.
:processReleaseJavaRes (Thread[Task worker for ':' Thread 2,5,main]) started.

> Task :processReleaseJavaRes NO-SOURCE
Skipping task ':processReleaseJavaRes' as it has no source files and no previous output files.
:processReleaseJavaRes (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.0 secs.
:transformResourcesWithMergeJavaResForRelease (Thread[Task worker for ':' Thread 2,5,main]) started.

> Task :transformResourcesWithMergeJavaResForRelease
Task ':transformResourcesWithMergeJavaResForRelease' is not up-to-date because:
  No history is available.
All input files are considered out-of-date for incremental task ':transformResourcesWithMergeJavaResForRelease'.
:transformResourcesWithMergeJavaResForRelease (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.272 secs.
:packageRelease (Thread[Task worker for ':' Thread 2,5,main]) started.

> Task :packageRelease
Task ':packageRelease' is not up-to-date because:
  No history is available.
All input files are considered out-of-date for incremental task ':packageRelease'.
Unable do incremental execution: full task run
:packageRelease (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 11.648 secs.
:assembleRelease (Thread[Task worker for ':' Thread 2,5,main]) started.

Task :assembleRelease Skipping task ':assembleRelease' as it has no actions. :assembleRelease (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.0 secs.

reckless
  • 741
  • 12
  • 53
  • 1
    This is probably (hopefully) not the complete error message. I'd there anything else in the output? Also, which version of the Android NDK are you using? – Frank Osterfeld Jul 07 '19 at 16:35
  • You are right. I found the error (unfortunately Qt Creator did not "make it red" so I could not spot it. – reckless Jul 07 '19 at 16:56
  • It turns out that Qt Creator did actually give more hints about the error I just couldn't see it in the wall of text as it was not highlighted. The error was: `Could not find google-services.json while looking in...` I fixed this but the application still fails to compile properly with the same error. Also I just noticed that the error appears only when I try to sign the package. – reckless Jul 07 '19 at 17:05
  • Also I just realised that I am able to sign the application manually using `apksigner` but I don't get why it doesn't work with Qt Creator. Unfortunately, without being able to sign the app within Qt Creator I cannot publish it on the store as the "Add debug server" option is always enabled if the "Sign package" option is disabled. – reckless Jul 21 '19 at 11:03
  • Have you tried using another NDK version? Qt doesnt really like the NDK versions after 16c or so. Use the NDK version that is recommended for your Qt version. Next thing I'd try is to downgrade your JDK; the more recent ones don't work for me either (when compiling APKs in Qt Creator). – markus-nm Jul 22 '19 at 15:01
  • @markus-nm yes I have tried different versions of the NDK and JDK. Currently I am using NDK r19c and JDK 8 (as recommended by Qt). The problem is specifically within my application as I just tried to create another simple app and was able to sign it. – reckless Aug 06 '19 at 17:19

0 Answers0