Errore compilazione app Android



  • Ciao ragazzi, uso qt su windows e linux da tempo ma voglio provare anche a sviluppare anche app android, ho provato a compilare una app vuota con le seguenti impostazioni:

    Versione QT: QT 5.6.2 for Android armv7
    Compilatore: Android GCC (arm-4.9)
    Versione JDK: 1.8.0
    Versione NDK: r10e

    Ma mi da il seguente errore

    Building the android package failed!
      -- For more information, run this command with --verbose.
    18:15:17: The process "F:\PROGRAMMI\QT_Android\5.6\android_armv7\bin\androiddeployqt.exe" exited with code 14.
    Error while building/deploying project CiaoMondo (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.2))
    When executing step "Build Android APK"
    

    Qualcuno potrebbe aiutarmi?
    Ho cercato già online ma le guide in inglese mi sono poco chiare.

    Grazie a tutti.



  • da https://bugreports.qt.io/browse/QTBUG-35247

    Il problema era causato dall'uso di ant.cmd invece di ant.bat.



  • @VRonin Non penso perchè ho già settato ant.bat 0_1501664127260_Cattura.PNG



  • puoi attivare il --verbose come dice l'errore e postare l'output?
    Quale versione di android SDK stai usando? 26?



  • @VRonin

    La versione degli SDK è la 25
    Ecco il verbose

    13:28:47: Running steps for project CiaoMondo...
    13:28:47: Configuration unchanged, skipping qmake step.
    13:28:47: Starting: "F:\PROGRAMMI\QT_Android\Tools\mingw492_32\bin\mingw32-make.exe" 
    mingw32-make: Nothing to be done for 'first'.
    13:28:49: The process "F:\PROGRAMMI\QT_Android\Tools\mingw492_32\bin\mingw32-make.exe" exited normally.
    13:28:49: Removing directory F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug\android-build
    13:28:49: Starting: "F:\PROGRAMMI\QT_Android\Tools\mingw492_32\bin\mingw32-make.exe" "INSTALL_ROOT="\""F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug\android-build"\""" install
    copy /y libCiaoMondo.so "F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug\android-build"\libs\armeabi-v7a\libCiaoMondo.so
            1 file copiati.
    13:28:51: The process "F:\PROGRAMMI\QT_Android\Tools\mingw492_32\bin\mingw32-make.exe" exited normally.
    13:28:51: Starting: "F:\PROGRAMMI\QT_Android\5.6\android_armv7\bin\androiddeployqt.exe" --input "F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-libCiaoMondo.so-deployment-settings.json" --output "F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build" --deployment bundled --android-platform android-25 --jdk "C:/Program Files (x86)/Java/jdk1.8.0_112" --verbose --ant F:/Download/ANDROID/apache-ant-1.8.0/bin/ant.bat
    Generating Android Package
      Input file: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-libCiaoMondo.so-deployment-settings.json
      Output directory: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/
      Application binary: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/libCiaoMondo.so
      Android build platform: android-25
      Install to device: No
    Copying Android package template.
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/AndroidManifest.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/build.gradle
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values/libs.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/layout/splash.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-de/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-el/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-es/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-et/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-fa/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-fr/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-id/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-it/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-ja/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-ms/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-nb/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-nl/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-pl/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-pt-rBR/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-ro/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-rs/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-ru/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-zh-rCN/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res/values-zh-rTW/strings.xml
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/src/org/kde/necessitas/ministro/IMinistro.aidl
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/src/org/kde/necessitas/ministro/IMinistroCallback.aidl
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/src/org/qtproject/qt5/android/bindings/QtActivity.java
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/src/org/qtproject/qt5/android/bindings/QtApplication.java
    Detecting dependencies of application.
    Reading dependencies from F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/libCiaoMondo.so
          lib/libQt5Widgets.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from F:/PROGRAMMI/QT_Android/5.6/android_armv7/lib/libQt5Widgets.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from F:/PROGRAMMI/QT_Android/5.6/android_armv7/lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from F:/PROGRAMMI/QT_Android/5.6/android_armv7/lib/libQt5Core.so
    Appending dependency: lib/libQt5Core.so
    Reading Android dependencies for Qt5Core
    Appending dependency: lib/libQt5Gui.so
    Reading Android dependencies for Qt5Gui
    Appending dependency from xml: plugins/platforms/android/libqtforandroid.so
    Appending dependency from xml: plugins/iconengines/libqsvgicon.so
    Appending dependency from xml: plugins/imageformats/libqdds.so
    Appending dependency from xml: plugins/imageformats/libqgif.so
    Appending dependency from xml: plugins/imageformats/libqicns.so
    Appending dependency from xml: plugins/imageformats/libqico.so
    Appending dependency from xml: plugins/imageformats/libqjpeg.so
    Appending dependency from xml: plugins/imageformats/libqsvg.so
    Appending dependency from xml: plugins/imageformats/libqtga.so
    Appending dependency from xml: plugins/imageformats/libqtiff.so
    Appending dependency from xml: plugins/imageformats/libqwbmp.so
    Appending dependency from xml: plugins/imageformats/libqwebp.so
    Appending dependency: lib/libQt5Widgets.so
    Reading Android dependencies for Qt5Widgets
    Reading dependencies from F:/PROGRAMMI/QT_Android/5.6/android_armv7/plugins/platforms/android/libqtforandroid.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from F:/PROGRAMMI/QT_Android/5.6/android_armv7/plugins/platforms/android/libqtforandroid.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Scanning for QML imports.
    Copying GNU STL library
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libgnustl_shared.so
    Copying 17 dependencies from Qt into package.
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libQt5Core.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/QtAndroid-bundled.jar
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/QtAndroidAccessibility-bundled.jar
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libQt5Gui.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_platforms_android_libqtforandroid.so
      -- Skipping F:/PROGRAMMI/QT_Android/5.6/android_armv7/plugins/iconengines/libqsvgicon.so. It has unmet dependencies: lib/libQt5Svg.so.
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqdds.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqgif.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqicns.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqico.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqjpeg.so
      -- Skipping F:/PROGRAMMI/QT_Android/5.6/android_armv7/plugins/imageformats/libqsvg.so. It has unmet dependencies: lib/libQt5Svg.so.
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqtga.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqtiff.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqwbmp.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqwebp.so
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libQt5Widgets.so
    Checking if application binary is in package.
    Copying gdbserver into package.
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/gdbserver
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build//libs/armeabi-v7a/libgdbserver.so
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Il processo ha tentato di scrivere in una pipe non esistente.
    Impossibile trovare il percorso specificato.
    Stripping libraries to minimize size.
    Updating Android package files with project settings.
      -- res/values/libs.xml
      -- AndroidManifest.xml 
      -- /src/org/qtproject/qt5/android/bindings/QtActivity.java
    Pregenerating entry list for assets file engine.
    Running Android tool to create package definition.
      -- Command: C:/Users/Utente/AppData/Local/Android/sdk/tools/android.bat update project --path "F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/" --target android-25 --name QtApp
    Building Android package using ant.
    Using ant: F:/Download/ANDROID/apache-ant-1.8.0/bin/ant.bat
    Building the android package failed!
    13:28:55: The process "F:\PROGRAMMI\QT_Android\5.6\android_armv7\bin\androiddeployqt.exe" exited with code 14.
    Error while building/deploying project CiaoMondo (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.2))
    When executing step "Build Android APK"
    13:28:55: Elapsed time: 00:08.
    


  • Ok, l'errore sembra questo: https://stackoverflow.com/questions/42912824/the-ant-folder-is-suddenly-missing-from-android-sdk-did-google-remove-it/42921645#42921645

    In pratica Android ha tolto ant dalla versione 25.3.0 in poi. Puoi provare a usare una versione dell'sdk precedente?

    In alternativa puoi chiamare manulmente androiddeployqt.exe e dirgli di usare gradle. come mostarto negli esempi qui https://forum.qt.io/topic/71763/how-to-switch-from-ant-to-gradle-while-qmake-building-command-line-or-in-a-shell-script/6



  • Ho provato a settare il gradle dalle impostazioni (Projects->Build Android APK->Advanced Actions->Use Gradle) ma nulla, è cambiato il codice d'errore.
    Questo è il verbose (provato con SDK 23, 21, 19 e 16)

    13:03:07: Running steps for project CiaoMondo...
    13:03:07: Configuration unchanged, skipping qmake step.
    13:03:07: Starting: "F:\PROGRAMMI\QT_Android\Tools\mingw492_32\bin\mingw32-make.exe" 
    mingw32-make: Nothing to be done for 'first'.
    13:03:09: The process "F:\PROGRAMMI\QT_Android\Tools\mingw492_32\bin\mingw32-make.exe" exited normally.
    13:03:09: Removing directory F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug\android-build/libs
    13:03:09: Starting: "F:\PROGRAMMI\QT_Android\Tools\mingw492_32\bin\mingw32-make.exe" "INSTALL_ROOT="\""F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug\android-build"\""" install
    copy /y libCiaoMondo.so "F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug\android-build"\libs\armeabi-v7a\libCiaoMondo.so
            1 file copiati.
    13:03:11: The process "F:\PROGRAMMI\QT_Android\Tools\mingw492_32\bin\mingw32-make.exe" exited normally.
    13:03:11: Starting: "F:\PROGRAMMI\QT_Android\5.6\android_armv7\bin\androiddeployqt.exe" --input "F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-libCiaoMondo.so-deployment-settings.json" --output "F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build" --deployment bundled --android-platform android-19 --jdk "C:/Program Files (x86)/Java/jdk1.8.0_112" --verbose --gradle
    Generating Android Package
      Input file: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-libCiaoMondo.so-deployment-settings.json
      Output directory: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/
      Application binary: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/libCiaoMondo.so
      Android build platform: android-19
      Install to device: No
    Delete missing files F:/PROGRAMMI/QT_Android/5.6/android_armv7/src/android/templates/res F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/res
    Delete missing files F:/PROGRAMMI/QT_Android/5.6/android_armv7/src/android/java/res F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/__qt5__android__files__res
    Delete missing files F:/PROGRAMMI/QT_Android/5.6/android_armv7/src/android/java/src F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_2-Debug/android-build/__qt5__android__files__src
    Copying Android package template.
    Cannot find template directory C:/Users/Utente/AppData/Local/Android/sdk/tools/templates/gradle/wrapper
    13:03:11: The process "F:\PROGRAMMI\QT_Android\5.6\android_armv7\bin\androiddeployqt.exe" exited with code 3.
    Error while building/deploying project CiaoMondo (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.2))
    When executing step "Build Android APK"
    13:03:11: Elapsed time: 00:04.
    


  • Sembra che manchi un pezzo di android sdk o e' settato nella posizione sbagliata. hai una cartella C:/Users/Utente/AppData/Local/Android/sdk/tools/templates/gradle/wrapper



  • No, questo è lo screen della cartella tools:
    0_1502191973330_Cattura.PNG



  • Mi sa che il problema e' https://bugreports.qt.io/browse/QTBUG-59236

    Cioe' Android sdk ha cambiato la struttura delle cartelle. Puoi usare Qt 5.9?



  • Ho anche la 5.8, adesso scarico la 5.9



  • Nemmeno con qt 5.9 funge, ora codice errore 4:

    16:53:52: Running steps for project CiaoMondo...
    16:53:52: Configuration unchanged, skipping qmake step.
    16:53:52: Starting: "F:\PROGRAMMI\QT_5.9\Tools\mingw530_32\bin\mingw32-make.exe" 
    F:\PROGRAMMI\QT_5.9\5.9\android_armv7\bin\qmake.exe -o Makefile ..\CiaoMondo\CiaoMondo.pro -spec android-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
    mingw32-make: Nothing to be done for 'first'.
    16:53:57: The process "F:\PROGRAMMI\QT_5.9\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    16:53:57: Removing directory F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug\android-build/libs
    16:53:57: Starting: "F:\PROGRAMMI\QT_5.9\Tools\mingw530_32\bin\mingw32-make.exe" "INSTALL_ROOT="\""F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug\android-build"\""" install
    F:\PROGRAMMI\QT_5.9\5.9\android_armv7\bin\qmake.exe -install qinstall program libCiaoMondo.so "F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug\android-build"\libs\armeabi-v7a\libCiaoMondo.so
    16:53:59: The process "F:\PROGRAMMI\QT_5.9\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    16:53:59: Starting: "F:\PROGRAMMI\QT_5.9\5.9\android_armv7\bin\androiddeployqt.exe" --input "F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-libCiaoMondo.so-deployment-settings.json" --output "F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build" --deployment bundled --android-platform android--1 --jdk "C:/Program Files (x86)/Java/jdk1.8.0_112" --gradle
    Generating Android Package
      Input file: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-libCiaoMondo.so-deployment-settings.json
      Output directory: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/
      Application binary: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/libCiaoMondo.so
      Android build platform: android--1
      Install to device: No
    qmlimportscanner: No such file or directory: "F:/Documenti/LAVORO/Android/QT/Hello"
    Warning: Android platform 'android--1' does not exist in SDK.
    Invalid json output from qmlimportscanner.
    16:54:00: The process "F:\PROGRAMMI\QT_5.9\5.9\android_armv7\bin\androiddeployqt.exe" exited with code 4.
    Error while building/deploying project CiaoMondo (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.9.0 for Android armv7))
    When executing step "Build Android APK"
    16:54:00: Elapsed time: 00:08.
    


  • Da https://v-play.net/developers/forums/t/problem-when-builds-apk

    il warning “Android platform ‘android–1’ does not exist in SDK.” puo indicare che la versione di Android SDK non e' stata identificata correttamente. Prova:

    1. Chiudi Qt Creator
    2. Cancella la build directory (non quella col sorgente ma quella con 'output)
    3. Cancella il file *.pro.user
    4. Riapri Qt Creator e il progetto
    5. Nel menu vai su Build->Clean (ho Qt Creator in inglese, non so come sono in italiano qui comandi, scusa)
    6. Nel menu vai su Build->Run qmake
    7. Compila il progetto
    

    Se ancora non funziona, chiudi Qt Creator, apri il file *.pro.user con blocco note e sostituisci tutti gli "android-1" con la versione corretta (android-25 per l'sdk 25), riaprilo e ripeti gli steps 5,6 e 7 sopra



  • Non ci crederai ma non funziona in entrambi i modi, ho cambiato tutti gli "android--1" con "android-21", clean, qmake e poi compilato ma ancora nulla, ecco il verbose:

    12:17:01: Running steps for project CiaoMondo...
    12:17:01: Configuration unchanged, skipping qmake step.
    12:17:01: Starting: "F:\PROGRAMMI\QT_5.9\Tools\mingw530_32\bin\mingw32-make.exe" 
    F:\PROGRAMMI\QT_5.9\5.9\android_armv7\bin\uic.exe ..\CiaoMondo\mainwindow.ui -o ui_mainwindow.h
    F:\Download\setup\ANDROID\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=F:\Download\setup\ANDROID\android-ndk-r10e/platforms/android-16/arch-arm/ -g -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\CiaoMondo -I. -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include\QtWidgets -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include\QtGui -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include\QtCore -I. -I. -isystem F:\Download\setup\ANDROID\android-ndk-r10e\sources\cxx-stl\gnu-libstdc++\4.9\include -isystem F:\Download\setup\ANDROID\android-ndk-r10e\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a\include -isystem F:\Download\setup\ANDROID\android-ndk-r10e\platforms\android-16\arch-arm\usr\include -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\mkspecs\android-g++ -o main.obj ..\CiaoMondo\main.cpp
    F:\Download\setup\ANDROID\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=F:\Download\setup\ANDROID\android-ndk-r10e/platforms/android-16/arch-arm/ -g -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\CiaoMondo -I. -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include\QtWidgets -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include\QtGui -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include\QtCore -I. -I. -isystem F:\Download\setup\ANDROID\android-ndk-r10e\sources\cxx-stl\gnu-libstdc++\4.9\include -isystem F:\Download\setup\ANDROID\android-ndk-r10e\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a\include -isystem F:\Download\setup\ANDROID\android-ndk-r10e\platforms\android-16\arch-arm\usr\include -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\mkspecs\android-g++ -o mainwindow.obj ..\CiaoMondo\mainwindow.cpp
    F:\Download\setup\ANDROID\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=F:\Download\setup\ANDROID\android-ndk-r10e/platforms/android-16/arch-arm/ -g -g -marm -O0 -std=gnu++11 -Wall -W -dM -E -o moc_predefs.h F:\PROGRAMMI\QT_5.9\5.9\android_armv7\mkspecs\features\data\dummy.cpp
    F:\PROGRAMMI\QT_5.9\5.9\android_armv7\bin\moc.exe -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include ./moc_predefs.h -IF:/PROGRAMMI/QT_5.9/5.9/android_armv7/mkspecs/android-g++ -I"F:/Documenti/LAVORO/Android/QT/Hello world/CiaoMondo" -IF:/PROGRAMMI/QT_5.9/5.9/android_armv7/include -IF:/PROGRAMMI/QT_5.9/5.9/android_armv7/include/QtWidgets -IF:/PROGRAMMI/QT_5.9/5.9/android_armv7/include/QtGui -IF:/PROGRAMMI/QT_5.9/5.9/android_armv7/include/QtCore -I. -IF:\Download\setup\ANDROID\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -IF:\Download\setup\ANDROID\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -IF:\Download\setup\ANDROID\android-ndk-r10e/platforms/android-16/arch-arm//usr/include -If:/download/setup/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/include -If:/download/setup/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/include-fixed -IF:/Download/setup/ANDROID/android-ndk-r10e/platforms/android-16/arch-arm/usr/include ..\CiaoMondo\mainwindow.h -o moc_mainwindow.cpp
    F:\Download\setup\ANDROID\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=F:\Download\setup\ANDROID\android-ndk-r10e/platforms/android-16/arch-arm/ -g -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\CiaoMondo -I. -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include\QtWidgets -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include\QtGui -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\include\QtCore -I. -I. -isystem F:\Download\setup\ANDROID\android-ndk-r10e\sources\cxx-stl\gnu-libstdc++\4.9\include -isystem F:\Download\setup\ANDROID\android-ndk-r10e\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a\include -isystem F:\Download\setup\ANDROID\android-ndk-r10e\platforms\android-16\arch-arm\usr\include -IF:\PROGRAMMI\QT_5.9\5.9\android_armv7\mkspecs\android-g++ -o moc_mainwindow.obj moc_mainwindow.cpp
    F:\Download\setup\ANDROID\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ --sysroot=F:\Download\setup\ANDROID\android-ndk-r10e/platforms/android-16/arch-arm/ -Wl,-soname,libCiaoMondo.so -Wl,-rpath=F:/PROGRAMMI/QT_5.9/5.9/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libCiaoMondo.so main.obj mainwindow.obj moc_mainwindow.obj   -LF:\Download\setup\ANDROID\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -LF:\Download\setup\ANDROID\android-ndk-r10e/platforms/android-16/arch-arm//usr/lib -Lf:/download/setup/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9 -LF:/PROGRAMMI/QT_5.9/5.9/android_armv7/lib -lQt5Widgets -Lc:\utils\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -Lc:\utils\android-ndk-r10e/platforms/android-16/arch-arm//usr/lib -Lc:/utils/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.9 -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
    12:17:13: The process "F:\PROGRAMMI\QT_5.9\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    12:17:13: Removing directory F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug\android-build/libs
    12:17:13: Starting: "F:\PROGRAMMI\QT_5.9\Tools\mingw530_32\bin\mingw32-make.exe" "INSTALL_ROOT="\""F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug\android-build"\""" install
    F:\PROGRAMMI\QT_5.9\5.9\android_armv7\bin\qmake.exe -install qinstall program libCiaoMondo.so "F:\Documenti\LAVORO\Android\QT\Hello world\build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug\android-build"\libs\armeabi-v7a\libCiaoMondo.so
    12:17:16: The process "F:\PROGRAMMI\QT_5.9\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    12:17:16: Starting: "F:\PROGRAMMI\QT_5.9\5.9\android_armv7\bin\androiddeployqt.exe" --input "F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-libCiaoMondo.so-deployment-settings.json" --output "F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build" --deployment bundled --android-platform android-21 --jdk "C:/Program Files (x86)/Java/jdk1.8.0_112" --verbose --gradle
    Generating Android Package
      Input file: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-libCiaoMondo.so-deployment-settings.json
      Output directory: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/
      Application binary: F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/libCiaoMondo.so
      Android build platform: android-21
      Install to device: No
    Delete missing files F:/PROGRAMMI/QT_5.9/5.9/android_armv7/src/android/templates/res F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/res
    Delete missing files F:/PROGRAMMI/QT_5.9/5.9/android_armv7/src/android/templates/res/values F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/res/values
    Copying Android package template.
      -- Skipping file F:/PROGRAMMI/QT_5.9/5.9/android_armv7/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.jar. Same or newer file already in place.
      -- Skipping file F:/PROGRAMMI/QT_5.9/5.9/android_armv7/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties. Same or newer file already in place.
      -- Skipping file F:/PROGRAMMI/QT_5.9/5.9/android_armv7/src/3rdparty/gradle/gradlew. Same or newer file already in place.
      -- Skipping file F:/PROGRAMMI/QT_5.9/5.9/android_armv7/src/3rdparty/gradle/gradlew.bat. Same or newer file already in place.
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/AndroidManifest.xml
      -- Skipping file F:/PROGRAMMI/QT_5.9/5.9/android_armv7/src/android/templates/build.gradle. Same or newer file already in place.
      -- Copied F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/res/values/libs.xml
    qmlimportscanner: No such file or directory: "F:/Documenti/LAVORO/Android/QT/Hello"
    Detecting dependencies of application.
    Reading dependencies from F:/Documenti/LAVORO/Android/QT/Hello world/build-CiaoMondo-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/libCiaoMondo.so
          lib/libQt5Widgets.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from F:/PROGRAMMI/QT_5.9/5.9/android_armv7/lib/libQt5Widgets.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from F:/PROGRAMMI/QT_5.9/5.9/android_armv7/lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from F:/PROGRAMMI/QT_5.9/5.9/android_armv7/lib/libQt5Core.so
    Appending dependency: lib/libQt5Core.so
    Reading Android dependencies for Qt5Core
    Appending dependency: lib/libQt5Gui.so
    Reading Android dependencies for Qt5Gui
    Appending dependency from xml: plugins/platforms/android/libqtforandroid.so
    Appending dependency from xml: plugins/iconengines/libqsvgicon.so
    Appending dependency from xml: plugins/imageformats/libqgif.so
    Appending dependency from xml: plugins/imageformats/libqicns.so
    Appending dependency from xml: plugins/imageformats/libqico.so
    Appending dependency from xml: plugins/imageformats/libqjpeg.so
    Appending dependency from xml: plugins/imageformats/libqsvg.so
    Appending dependency from xml: plugins/imageformats/libqtga.so
    Appending dependency from xml: plugins/imageformats/libqtiff.so
    Appending dependency from xml: plugins/imageformats/libqwbmp.so
    Appending dependency from xml: plugins/imageformats/libqwebp.so
    Appending dependency: lib/libQt5Widgets.so
    Reading Android dependencies for Qt5Widgets
    Reading dependencies from F:/PROGRAMMI/QT_5.9/5.9/android_armv7/plugins/platforms/android/libqtforandroid.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from F:/PROGRAMMI/QT_5.9/5.9/android_armv7/plugins/platforms/android/libqtforandroid.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Scanning for QML imports.
    Invalid json output from qmlimportscanner.
    12:17:17: The process "F:\PROGRAMMI\QT_5.9\5.9\android_armv7\bin\androiddeployqt.exe" exited with code 4.
    Error while building/deploying project CiaoMondo (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.9.0 for Android armv7))
    When executing step "Build Android APK"
    12:17:17: Elapsed time: 00:16.
    


  • @Samurai016 said in Errore compilazione app Android:

    qmlimportscanner: No such file or directory: "F:/Documenti/LAVORO/Android/QT/Hello"

    quella cartella esiste?



  • Ok perfetto ora funziona, c'era quella cartella con un nome diverso, l'ho rinominata e ora va, grazie mille davvero, c'è un modo per metterti un voto o dei punti al profilo? Complimenti davvero, grazie ancora @VRonin



  • Felice che abbia funzionato.
    Non ti proccupare dei punti, non siamo qui per quello.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.