Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Start with <a href="https://stackoverflow.com/questions/7432449/android-ndk-build-with-ant-script">Android NDK build with ANT script</a>, with minimal change:</p> <pre><code>&lt;target name="-pre-build"&gt; &lt;exec executable="${ndk.dir}/ndk-build" failonerror="true"/&gt; &lt;arg value="APP_ABI=${abi}"/&gt; &lt;/target&gt; </code></pre> <p>and use a batch file to run the loop (I use a simple <code>sed</code> script; sed is available in <code>%NDK_ROOT%\prebuilt\windows\bin\</code> and on all other platforms):</p> <pre><code>sed -i -e "s/versionCode=\"\([0-9]*\).]\"/versionCode=\"\11\"/" AndroidManifest.xml ant -Dsdk.dir=%SDK_ROOT% -Dndk.dir=%NDK_ROOT% -Dabi=armeabi release ren %apkfile%.apk %apkfile%_armeabi.apk sed -i -e "s/versionCode=\"\([0-9]*\).\"/versionCode=\"\12\"/" AndroidManifest.xml ant -Dsdk.dir=%SDK_ROOT% -Dndk.dir=%NDK_ROOT% -Dabi=mips release ren %apkfile%.apk %apkfile%_mips.apk sed -i -e "s/versionCode=\"\([0-9]*\).\"/versionCode=\"\13\"/" AndroidManifest.xml ant -Dsdk.dir=%SDK_ROOT% -Dndk.dir=%NDK_ROOT% -Dabi=armeabi-v7a release ren %apkfile%.apk %apkfile%_armeabi-v7a.apk sed -i -e "s/versionCode=\"\([0-9]*\).\"/versionCode=\"\14\"/" AndroidManifest.xml ant -Dsdk.dir=%SDK_ROOT% -Dndk.dir=%NDK_ROOT% -Dabi=x86 release ren %apkfile%.apk %apkfile%_x86.apk </code></pre> <p>This assumes that <strong>android.verisonCode</strong> in the manifest file has zero as last digit, e.g. <code>android:versionCode="40260"</code>.</p> <p>Note that there is technically no reason to change versionCode for <strong>armeabi</strong> and <strong>mips</strong> variants, but it may be important to keep <strong>armeabi &lt; armeabi-v7a &lt; x86</strong>.</p> <p><strong>Update</strong> Thanks to <a href="https://stackoverflow.com/users/2767181/ashwin-s-ashok">Ashwin S Ashok</a> for proposing an even better numbering scheme: <code>VERSION+10000*CPU</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload