Packaging Error: Command 'ant clean debug' failed.Exit code: 1



  • I have manage to compile Qt5 for android and now i try to run a simple "Hello world" but i have this error

    error: [install_target] Error 126 (ignored)
    error: Packaging Error: Command 'ant clean debug' failed.Exit code: 1

    Ps:
    -The os is Mac OS X Lion 10.7.5
    -java version "1.7.0_21"
    -android ndk android-ndk-r8e-ma-darwin-x86.7z



  • I have the exact same error, but running on Windows 8 with the latest Android NDK and SDK. I am using Qt 5.1 RC1 and Qt Creator 2.7.2.

    Compile Output:

    @23:01:57: Running steps for project Test...
    23:01:57: Configuration unchanged, skipping qmake step.
    23:01:57: Starting: "C:\Qt\Qt5.1.0\Tools\mingw48_32\bin\mingw32-make.exe"
    mingw32-make: Nothing to be done for 'first'.
    23:01:58: The process "C:\Qt\Qt5.1.0\Tools\mingw48_32\bin\mingw32-make.exe" exited normally.
    23:01:58: Starting: "C:\Qt\Qt5.1.0\Tools\mingw48_32\bin\mingw32-make.exe" INSTALL_ROOT="C:/Qt/Projects/Test/android" install
    cp -f -R C:/Qt/Projects/Test/qml/Test C:/Qt/Projects/Test/android/assets/qml/
    cp -f "libTest.so" "C:/Qt/Projects/Test/android/libs/armeabi-v7a/libTest.so"
    23:01:58: The process "C:\Qt\Qt5.1.0\Tools\mingw48_32\bin\mingw32-make.exe" exited normally.
    23:01:58: Copy Qt app & libs to Android package ...
    23:01:59: Creating package file ...
    23:01:59: Package deploy: Running command 'D:/android/ant/bin/ant.bat clean debug'.
    Buildfile: build.xml does not exist!
    Build failed
    Packaging Error: Command 'D:/android/ant/bin/ant.bat clean debug' failed.Exit code: 1
    Error while building/deploying project Test (kit: Android for arm (GCC 4.4.3, Qt 5.1.0))
    When executing step 'Packaging for Android'
    23:01:59: Elapsed time: 00:02.@

    I have tried looking for an answer to this, but nothing seems to work. Did not see any Qt Bugs either.



  • Ok, somehow I fixed it, don't actually know how but I think restarting the computer a few times as well as the Qt Creator helped.

    I noticed that I did not have any choice of which SDK to use in the drop down in the Projects->Run->Package configurations->Manifest dialog:

    http://doc-snapshot.qt-project.org/qtcreator-2.8/creator-deploying-android.html#specifying-package-data

    After a few restarts I noticed that Qt Creator had discovered the SDK's I had installed (the selected item was blank, so I had to press it and select a SDK from the drop down list, something I could not do earlier).

    When I did that I got a step further, but still had a problem. The ant tool would not allow me to build an android application with a Package name that was ".Test". My project was called Test, so the Package Name was automatically called ".Test".

    I tried to change that also in the Manifest Dialog: http://doc-snapshot.qt-project.org/qtcreator-2.8/creator-deploying-android.html#specifying-package-data

    But I could not change that value in Qt Creator in that dialog. This has to be a bug!!

    Anyway, I just opened the AndroidManifest.xml file in Qt Creator (it is in the Other files -> android folder) and changed the package name to "com.mycompany.test" and it worked!!

    I got it deployed to my device (Galaxy S3).

    I hope that anyone else having this problem might get some help from my frustration. Enjoy!



  • just delete Android SDK Build-tools revision 19 and install prev version 18.1.1. Now it's working!



  • I can believe that to fix this issue, I just need to re-name my package as "com.whatnever.myAPP", thanks Genonn


Log in to reply
 

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