<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- androidapk.qdoc --> <title>AndroidApk QML Type | Qbs Manual</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td ><a href="index.html">Qbs Manual</a></td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qbs 1.12.2</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <link rel="next" href="qml-qbsconvenienceitems-appleapplicationdiskimage.html" /> <p class="naviNextPrevious headerNavi"> <a class="nextPage" href="qml-qbsconvenienceitems-appleapplicationdiskimage.html">AppleApplicationDiskImage</a> </p><p/> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#properties">Properties</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">AndroidApk QML Type</h1> <span class="subtitle"></span> <!-- $$$AndroidApk-brief --> <p>Android application package. <a href="#details">More...</a></p> <!-- @@@AndroidApk --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QbsConvenienceItems .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qbslanguageitems-product.html">Product</a></p> </td></tr></table></div><ul> <li><a href="qml-qbsconvenienceitems-androidapk-members.html">List of all members, including inherited members</a></li> </ul> <a name="properties"></a> <h2 id="properties">Properties</h2> <ul> <li class="fn"><b><b><a href="qml-qbsconvenienceitems-androidapk.html#assetsDir-prop">assetsDir</a></b></b> : path</li> <li class="fn"><b><b><a href="qml-qbsconvenienceitems-androidapk.html#automaticSources-prop">automaticSources</a></b></b> : bool</li> <li class="fn"><b><b><a href="qml-qbsconvenienceitems-androidapk.html#manifestFile-prop">manifestFile</a></b></b> : path</li> <li class="fn"><b><b><a href="qml-qbsconvenienceitems-androidapk.html#packageName-prop">packageName</a></b></b> : string</li> <li class="fn"><b><b><a href="qml-qbsconvenienceitems-androidapk.html#resourcesDir-prop">resourcesDir</a></b></b> : path</li> <li class="fn"><b><b><a href="qml-qbsconvenienceitems-androidapk.html#sourcesDir-prop">sourcesDir</a></b></b> : path</li> </ul> <!-- $$$AndroidApk-description --> <a name="details"></a> <h2 id="details">Detailed Description</h2> <p>An <a href="qml-qbsconvenienceitems-androidapk.html">AndroidApk</a> item is a <a href="qml-qbslanguageitems-product.html">product</a> of the <a href="qml-qbslanguageitems-product.html#type-prop">type</a> <code>android.apk</code> that has a <a href="qml-qbslanguageitems-depends.html">dependency</a> on the <a href="qml-qbsmodules-android-sdk.html">Android.sdk</a> module. The final build result is an Android application package (APK) file.</p> <p>Here is what the project file could look like for the BasicMediaDecoder example that comes with the Android SDK:</p> <pre class="cpp"> import qbs AndroidApk { name: <span class="string">"Basic Media Decoder"</span> packageName: <span class="string">"com.example.android.basicmediadecoder"</span> property string sourcesPrefix: <span class="string">"Application/src/main/"</span> resourcesDir: sourcesPrefix <span class="operator">+</span> <span class="string">"/res"</span> sourcesDir: sourcesPrefix <span class="operator">+</span> <span class="string">"/java"</span> manifestFile: sourcesPrefix <span class="operator">+</span> <span class="string">"/AndroidManifest.xml"</span> } </pre> <!-- @@@AndroidApk --> <h2>Property Documentation</h2> <!-- $$$assetsDir --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="assetsDir-prop"> <td class="tblQmlPropNode"><p> <a name="assetsDir-prop"></a><span class="name">assetsDir</span> : <span class="type">path</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The base directory for Android assets.</p> <p><b>Note: </b>Android requires that the file name of this directory is always <code>"assets"</code>.</p><p>Default: <code>"assets"</code></p> </div></div><!-- @@@assetsDir --> <br/> <!-- $$$automaticSources --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="automaticSources-prop"> <td class="tblQmlPropNode"><p> <a name="automaticSources-prop"></a><span class="name">automaticSources</span> : <span class="type">bool</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>If <code>true</code>, Java sources as well as Android resources, assets, and the manifest file will be automatically included in the product via wildcards. Set this property to <code>false</code> if you want to specify these files manually.</p> <p>Default: <code>true</code></p> </div></div><!-- @@@automaticSources --> <br/> <!-- $$$manifestFile --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="manifestFile-prop"> <td class="tblQmlPropNode"><p> <a name="manifestFile-prop"></a><span class="name">manifestFile</span> : <span class="type">path</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The file path to the Android manifest file.</p> <p><b>Note: </b>Android requires that the file name is always "AndroidManifest.xml".</p><p>Default: <code>"AndroidManifest.xml"</code></p> </div></div><!-- @@@manifestFile --> <br/> <!-- $$$packageName --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="packageName-prop"> <td class="tblQmlPropNode"><p> <a name="packageName-prop"></a><span class="name">packageName</span> : <span class="type">string</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The package name as given in the manifest file.</p> <p>Default: <code>name</code></p> </div></div><!-- @@@packageName --> <br/> <!-- $$$resourcesDir --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="resourcesDir-prop"> <td class="tblQmlPropNode"><p> <a name="resourcesDir-prop"></a><span class="name">resourcesDir</span> : <span class="type">path</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The base directory for Android resources.</p> <p><b>Note: </b>Android requires that the file name of this directory is always <code>"res"</code>.</p><p>Default: <code>"res"</code></p> </div></div><!-- @@@resourcesDir --> <br/> <!-- $$$sourcesDir --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="sourcesDir-prop"> <td class="tblQmlPropNode"><p> <a name="sourcesDir-prop"></a><span class="name">sourcesDir</span> : <span class="type">path</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The base directory for Java sources. This property is only relevant if <a href="qml-qbsconvenienceitems-androidapk.html#automaticSources-prop">automaticSources</a> is enabled.</p> <p>Default: <code>"src"</code></p> </div></div><!-- @@@sourcesDir --> <br/> <p class="naviNextPrevious footerNavi"> <a class="nextPage" href="qml-qbsconvenienceitems-appleapplicationdiskimage.html">AppleApplicationDiskImage</a> </p> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>