title: Simple command to build my Unity project for android via command line
body: <p>What is the right command to build a Unity project as an Android apk?</p>
  <p>Using this command I'm able to compile for Windows:</p>
  <pre><code>&quot;C:\Program Files\Unity\Hub\Editor\2019.4.29f1\Editor\Unity.exe&quot; 
    -batchmode 
    -nographics  
    -projectPath &quot;C:\Users\MyUser\MyGitRepo\MyUnityProject&quot; 
    -buildWindowsPlayer &quot;C:\Users\MyUser\Desktop\MyGame.exe&quot; 
    -logFile 
    &quot;C:\Users\MyUser\Desktop\build.log&quot; 
    -quit
  </code></pre>
  <p>(This is a one line command)</p>
  <p>However now I want to do the same for Android. What to I need to change?</p>
  <pre><code>-buildAndroidPlayer
  </code></pre>
  <p>did not work for me...</p>
  <p><strong>Update</strong><br />
  <a href="https://docs.unity.cn/560/Documentation/Manual/CommandLineArguments.html" rel="nofollow noreferrer">This website</a> has an overview of command line options. There are options for anything but Android
  (eg <code>-buildOSX64Player &lt;pathname&gt;</code> etc). I can
  specify <code>-buildTarget &lt;name&gt;</code> where  would be android. But I still dont get any apk. Also it does not say to specify an output path</p>