[Android] Issues with ant



  • I have some issues I don't understand with ant during the clean debug command.
    Here is the trace :
    @17:20:38: Déploiement du paquet : exécution de la commande "C:/sdk/apache-ant-1.9.1/bin/ant.bat clean debug".
    Buildfile: C:\projects\HomeDesign3D\Projects\Qt\android\build.xml

    -check-env:
    [checkenv] Android SDK Tools Revision 22.0.1
    [checkenv] Installed at C:\sdk\adt-bundle-windows-x86_64-20130522\sdk

    -setup:
    [echo] Project Name: Home Design 3D
    [gettype] Project Type: Application

    ....

     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [aapt] C:\projects\HomeDesign3D\Projects\Qt\android\bin\AndroidManifest.xml:9: error: Error: No resource found that matches the given name (at 'resource' with value '@array/qt_sources').
     [aapt] C:\projects\HomeDesign3D\Projects\Qt\android\bin\AndroidManifest.xml:10: error: Error: No resource found that matches the given name (at 'value' with value '@string/repository').
     [aapt] C:\projects\HomeDesign3D\Projects\Qt\android\bin\AndroidManifest.xml:11: error: Error: No resource found that matches the given name (at 'resource' with value '@array/qt_libs').
     [aapt] C:\projects\HomeDesign3D\Projects\Qt\android\bin\AndroidManifest.xml:12: error: Error: No resource found that matches the given name (at 'resource' with value '@array/bundled_libs').
     [aapt] C:\projects\HomeDesign3D\Projects\Qt\android\bin\AndroidManifest.xml:16: error: Error: No resource found that matches the given name (at 'resource' with value '@array/bundled_in_lib').
     [aapt] C:\projects\HomeDesign3D\Projects\Qt\android\bin\AndroidManifest.xml:17: error: Error: No resource found that matches the given name (at 'resource' with value '@array/bundled_in_assets').
    

    BUILD FAILED
    C:\sdk\adt-bundle-windows-x86_64-20130522\sdk\tools\ant\build.xml:650: The following error occurred while executing this line:
    C:\sdk\adt-bundle-windows-x86_64-20130522\sdk\tools\ant\build.xml:691: null returned: 1

    Total time: 1 second
    Erreur de paquetage : la commande "C:/sdk/apache-ant-1.9.1/bin/ant.bat clean debug" a échoué.Code de sortie : 1
    Erreur lors de la compilation/déploiement du projet HomeDesign3D (kit : Android for arm (GCC 4.7, Qt 5.1.0))
    Lors de l'exécution de l'étape "Paquetage pour Android"@

    My manifest :
    @<?xml version='1.0' encoding='utf-8'?>
    <manifest android:versionCode="1" package="fr.anuman.HomeDesign3D" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="300">
    <application android:name="org.qtproject.qt5.android.bindings.SingletonQtApplication" android:label="@string/app_name">
    <activity android:name="org.qtproject.qt5.android.bindings.QtActivity" android:configChanges="orientation|locale|fontScale|keyboard|keyboardHidden|navigation" android:label="@string/app_name">
    <intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>
    <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
    <meta-data android:name="android.app.repository" android:value="@string/repository"/>
    <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
    <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
    <meta-data android:name="android.app.lib_name" android:value="HomeDesign3D"/>
    <!-- Deploy Qt libs as part of package -->
    <meta-data android:name="android.app.bundle_local_qt_libs" android:value="1"/>
    <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
    <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
    <!-- Run with local libs -->
    <meta-data android:name="android.app.use_local_qt_libs" android:value="1"/>
    <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
    <meta-data android:name="android.app.load_local_libs" android:value=":"/>
    <meta-data android:name="android.app.load_local_jars" android:value=":"/>
    <meta-data android:name="android.app.static_init_classes" android:value=":"/>
    <!-- Messages maps -->
    <meta-data android:name="android.app.ministro_not_found_msg" android:value="@string/ministro_not_found_msg"/>
    <meta-data android:name="android.app.ministro_needed_msg" android:value="@string/ministro_needed_msg"/>
    <meta-data android:name="android.app.fatal_error_msg" android:value="@string/fatal_error_msg"/>
    <!-- Messages maps -->
    <!-- Splash screen -->
    <meta-data android:name="android.app.splash_screen" android:resource="@layout/splash"/>
    <!-- Splash screen -->
    </activity>
    </application>
    <supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    </manifest>@

    My device target support android SDK 10.



  • Show your android configuration in the Qt creator.



  • Which part of my android configuration can be wrong? Because I had already tested a lot of think.

    My android sdk and ndk seems correctly configured, and it's the same for ant and jdk paths.



  • Could you pls show a screenshot of it?
    Btw, make sure you have the x86 ndk, but this most likely wont cause this issue



  • "Screenshot":https://docs.google.com/file/d/0BygGiQfhIcvGN21qaFYwQmNNaFk/edit?usp=sharing

    I have the x86_64 ndk because I under Windows Seven 64bits.
    Please notice, I already get it works with this ndk.



  • But Qt is not made for x64 actually, at least not the windows version.
    Btw, update your java jdk. Its outdated and vulnerable.
    What might be an issue is that you are using x86 JDK, but not the x86 NDK.

    Edit: I just checked my windows install of Qt (usually I use linux) and I have the x86 NDK and x64 java.
    http://i.imgur.com/P7iQraG.png
    On linux I also got this clean debug error, but it was related to some false java directory, so it wasnt working.



  • Ok nothing works.
    I put sdk and ndk in 32bits, upgrade jdk and test ant 1.8.4 version. Every-thing without success.
    I also launched qmake and restarted my computer.



  • Hmm, somewhere I read this might happen if you have any kind of special character in one of the resources (like a library name, app name etc.)
    Btw, regarding the resource errors you get. Could you pls go to your Qt project, then /android/res/values and show the content of libs.xml



  • [quote author="Moster" date="1376038382"]
    On linux I also got this clean debug error, but it was related to some false java directory, so it wasnt working.[/quote]

    Simply install java sdk in separate folder, select this folder in QtCreator settings and it will work... have had same problem.

    After any changes do not forgot to delete "android" folder in your project folder. Run qmake and build your project, android folder will be recreated with current settings.



  • [quote author="AcerExtensa" date="1376048185"]
    [quote author="Moster" date="1376038382"]
    On linux I also got this clean debug error, but it was related to some false java directory, so it wasnt working.[/quote]

    Simply install java sdk in separate folder, select this folder in QtCreator settings and it will work... have had same problem.

    After any changes do not forgot to delete "android" folder in your project folder. Run qmake and build your project, android folder will be recreated with current settings.
    [/quote]

    Thanks, but I resolved this error ages ago :) I just said that it was related to a wrong java sdk folder in my android configuration



  • Oh, ok, but for Flamaros try this:

    bq. After any changes do not forgot to delete “android” folder in your project folder. Run qmake and build your project, android folder will be recreated with current settings.



  • Thanks a lot, It works.

    We have some issues with the android folder, because we added some java files and do some modifications modifications in the androidManifest to launch our own java Application object.

    [quote author="AcerExtensa" date="1376048822"]Oh, ok, but for Flamaros try this:

    bq. After any changes do not forgot to delete “android” folder in your project folder. Run qmake and build your project, android folder will be recreated with current settings. [/quote]



  • I just found that I can use Context.getApplicationContext() instead of inherit QtApplication, to be able to call java methods I need for our extentions


Log in to reply
 

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