title: Bug: `cordova build android` doesn't produce an APK
body: <p>Building the Android platform with Cordova prints <code>BUILD SUCCESSFUL</code>, but the <code>Built the following apk(s)</code> list is empty, and so is the output directory (<code>platforms/android/build/outputs/</code>).</p>
  
  <pre><code>$ ./node_modules/.bin/cordova build android
  Preparing Firebase on Android
  ANDROID_HOME=F:\harieta\griozdai\sdk-tools-windows-3859397
  JAVA_HOME=C:\Program Files\Java\jdk1.8.0_112
  Subproject Path: CordovaLib
  The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
          at build_1x9jhvsdv38p50axqouny9ti6.run(E:\ivairus\cygwin\home\Dominykas\darbalaukiai\__kontraktai\iko-app\platforms\android\build.gradle:142)
  The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
  Incremental java compilation is an incubating feature.
  The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
  :preBuild UP-TO-DATE
  :preDebugBuild UP-TO-DATE
  :checkDebugManifest
  :preReleaseBuild UP-TO-DATE
  :CordovaLib:preBuild UP-TO-DATE
  :CordovaLib:preDebugBuild UP-TO-DATE
  :CordovaLib:checkDebugManifest
  :CordovaLib:prepareDebugDependencies
  :CordovaLib:compileDebugAidl
  :CordovaLib:compileDebugNdk UP-TO-DATE
  :CordovaLib:compileLint
  :CordovaLib:copyDebugLint UP-TO-DATE
  :CordovaLib:mergeDebugShaders
  :CordovaLib:compileDebugShaders
  :CordovaLib:generateDebugAssets
  :CordovaLib:mergeDebugAssets
  :CordovaLib:mergeDebugProguardFiles
  :CordovaLib:packageDebugRenderscript UP-TO-DATE
  :CordovaLib:compileDebugRenderscript
  :CordovaLib:generateDebugResValues
  :CordovaLib:generateDebugResources
  :CordovaLib:packageDebugResources
  :CordovaLib:processDebugManifest
  :CordovaLib:generateDebugBuildConfig
  :CordovaLib:processDebugResources
  :CordovaLib:generateDebugSources
  :CordovaLib:incrementalDebugJavaCompilationSafeguard
  :CordovaLib:compileDebugJavaWithJavac
  :CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
  Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  :CordovaLib:processDebugJavaRes UP-TO-DATE
  :CordovaLib:transformResourcesWithMergeJavaResForDebug
  :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
  :CordovaLib:mergeDebugJniLibFolders
  :CordovaLib:transformNative_libsWithMergeJniLibsForDebug
  :CordovaLib:transformNative_libsWithSyncJniLibsForDebug
  :CordovaLib:bundleDebug
  :CordovaLib:preReleaseBuild UP-TO-DATE
  :CordovaLib:checkReleaseManifest
  :CordovaLib:prepareReleaseDependencies
  :CordovaLib:compileReleaseAidl
  :CordovaLib:compileReleaseNdk UP-TO-DATE
  :CordovaLib:copyReleaseLint UP-TO-DATE
  :CordovaLib:mergeReleaseShaders
  :CordovaLib:compileReleaseShaders
  :CordovaLib:generateReleaseAssets
  :CordovaLib:mergeReleaseAssets
  :CordovaLib:mergeReleaseProguardFiles
  :CordovaLib:packageReleaseRenderscript UP-TO-DATE
  :CordovaLib:compileReleaseRenderscript
  :CordovaLib:generateReleaseResValues
  :CordovaLib:generateReleaseResources
  :CordovaLib:packageReleaseResources
  :CordovaLib:processReleaseManifest
  :CordovaLib:generateReleaseBuildConfig
  :CordovaLib:processReleaseResources
  :CordovaLib:generateReleaseSources
  :CordovaLib:incrementalReleaseJavaCompilationSafeguard
  :CordovaLib:compileReleaseJavaWithJavac
  :CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
  Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  :CordovaLib:processReleaseJavaRes UP-TO-DATE
  :CordovaLib:transformResourcesWithMergeJavaResForRelease
  :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
  :CordovaLib:mergeReleaseJniLibFolders
  :CordovaLib:transformNative_libsWithMergeJniLibsForRelease
  :CordovaLib:transformNative_libsWithSyncJniLibsForRelease
  :CordovaLib:bundleRelease
  :prepareAndroidArchLifecycleRuntime100Library
  :prepareComAndroidSupportAnimatedVectorDrawable2701Library
  :prepareComAndroidSupportAppcompatV72701Library
  :prepareComAndroidSupportCardviewV72701Library
  :prepareComAndroidSupportCustomtabs2701Library
  :prepareComAndroidSupportSupportCompat2701Library
  :prepareComAndroidSupportSupportCoreUi2701Library
  :prepareComAndroidSupportSupportCoreUtils2701Library
  :prepareComAndroidSupportSupportFragment2701Library
  :prepareComAndroidSupportSupportMediaCompat2701Library
  :prepareComAndroidSupportSupportV42701Library
  :prepareComAndroidSupportSupportVectorDrawable2701Library
  :prepareComFacebookAndroidFacebookAndroidSdk4290Library
  :prepareComFacebookAndroidFacebookApplinks4290Library
  :prepareComFacebookAndroidFacebookCommon4290Library
  :prepareComFacebookAndroidFacebookCore4290Library
  :prepareComFacebookAndroidFacebookLogin4290Library
  :prepareComFacebookAndroidFacebookMessenger4290Library
  :prepareComFacebookAndroidFacebookPlaces4290Library
  :prepareComFacebookAndroidFacebookShare4290Library
  :prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1180Library
  :prepareComGoogleAndroidGmsPlayServicesAnalyticsImplLicense1180Library
  :prepareComGoogleAndroidGmsPlayServicesBase1180Library
  :prepareComGoogleAndroidGmsPlayServicesBaseLicense1180Library
  :prepareComGoogleAndroidGmsPlayServicesBasement1180Library
  :prepareComGoogleAndroidGmsPlayServicesBasementLicense1180Library
  :prepareComGoogleAndroidGmsPlayServicesTagmanager1180Library
  :prepareComGoogleAndroidGmsPlayServicesTagmanagerApi1180Library
  :prepareComGoogleAndroidGmsPlayServicesTagmanagerApiLicense1180Library
  :prepareComGoogleAndroidGmsPlayServicesTagmanagerLicense1180Library
  :prepareComGoogleAndroidGmsPlayServicesTasks1180Library
  :prepareComGoogleAndroidGmsPlayServicesTasksLicense1180Library
  :prepareComGoogleFirebaseFirebaseAnalytics1180Library
  :prepareComGoogleFirebaseFirebaseAnalyticsImpl1180Library
  :prepareComGoogleFirebaseFirebaseAnalyticsImplLicense1180Library
  :prepareComGoogleFirebaseFirebaseAnalyticsLicense1180Library
  :prepareComGoogleFirebaseFirebaseAuth1180Library
  :prepareComGoogleFirebaseFirebaseAuthLicense1180Library
  :prepareComGoogleFirebaseFirebaseCommon1180Library
  :prepareComGoogleFirebaseFirebaseCommonLicense1180Library
  :prepareComGoogleFirebaseFirebaseConfig1180Library
  :prepareComGoogleFirebaseFirebaseConfigLicense1180Library
  :prepareComGoogleFirebaseFirebaseCore1180Library
  :prepareComGoogleFirebaseFirebaseCrash1180Library
  :prepareComGoogleFirebaseFirebaseCrashLicense1180Library
  :prepareComGoogleFirebaseFirebaseIid1180Library
  :prepareComGoogleFirebaseFirebaseIidLicense1180Library
  :prepareComGoogleFirebaseFirebaseMessaging1180Library
  :prepareComGoogleFirebaseFirebaseMessagingLicense1180Library
  :prepareMeLeolinShortcutBadger114Library
  :prepareOrgApacheCordovaCordovaLib630DebugLibrary
  :prepareDebugDependencies
  :compileDebugAidl
  :compileDebugRenderscript UP-TO-DATE
  :generateDebugBuildConfig
  :generateDebugResValues UP-TO-DATE
  :generateDebugResources UP-TO-DATE
  :mergeDebugResources
  :processDebugManifest
  :processDebugResources
  :generateDebugSources
  :incrementalDebugJavaCompilationSafeguard
  :compileDebugJavaWithJavac
  :compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
  Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  :compileDebugNdk UP-TO-DATE
  :compileDebugSources
  :mergeDebugShaders
  :compileDebugShaders
  :generateDebugAssets
  :mergeDebugAssets
  :transformClassesWithDexForDebug
  :mergeDebugJniLibFolders
  :transformNative_libsWithMergeJniLibsForDebug
  :processDebugJavaRes UP-TO-DATE
  :transformResourcesWithMergeJavaResForDebug
  :validateSigningDebug
  :packageDebug
  :assembleDebug
  :cdvBuildDebug
  
  BUILD SUCCESSFUL
  
  Total time: 1 mins 48.386 secs
  Built the following apk(s):
  </code></pre>
  
  <p>Versions:</p>
  
  <pre><code>$ gradle -v
  
  ------------------------------------------------------------
  Gradle 4.4
  ------------------------------------------------------------
  
  Build time:   2017-12-06 09:05:06 UTC
  Revision:     cf7821a6f79f8e2a598df21780e3ff7ce8db2b82
  
  Groovy:       2.4.12
  Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
  JVM:          1.8.0_112 (Oracle Corporation 25.112-b15)
  OS:           Windows 10 10.0 amd64
  
  $ ./node_modules/.bin/cordova -v
  7.1.0
  
  $ node -v
  v8.5.0
  
  $ npm -v
  5.4.2
  </code></pre>
  
  <p>Redacted <code>config.xml</code>:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;widget id="[]" version="1.1.9" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
      &lt;name&gt;[]&lt;/name&gt;
      &lt;description&gt;
          []
      &lt;/description&gt;
      &lt;author email="[]" href="[]"&gt;
          []
      &lt;/author&gt;
      &lt;content src="index.html" /&gt;
      &lt;access origin="*" /&gt;
      &lt;allow-intent href="http://*/*" /&gt;
      &lt;allow-intent href="https://*/*" /&gt;
      &lt;allow-intent href="tel:*" /&gt;
      &lt;allow-intent href="sms:*" /&gt;
      &lt;allow-intent href="mailto:*" /&gt;
      &lt;allow-intent href="geo:*" /&gt;
      &lt;access origin="*" /&gt;
      &lt;allow-navigation href="*" /&gt;
      &lt;allow-intent href="http://*/*" /&gt;
      &lt;allow-intent href="https://*/*" /&gt;
      &lt;platform name="android"&gt;
          &lt;preference name="android-minSdkVersion" value="21" /&gt;
          &lt;allow-intent href="market:*" /&gt;
          &lt;icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /&gt;
          &lt;icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /&gt;
          &lt;icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" /&gt;
          &lt;icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" /&gt;
          &lt;icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" /&gt;
          &lt;icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" /&gt;
          &lt;preference name="loadUrlTimeoutValue" value="120000" /&gt;
      &lt;/platform&gt;
      &lt;platform name="ios"&gt;
          &lt;allow-intent href="itms:*" /&gt;
          &lt;allow-intent href="itms-apps:*" /&gt;
          &lt;preference name="deployment-target" value="9.3" /&gt;
          &lt;preference name="UIWebViewBounce" value="false" /&gt;
          &lt;preference name="DisallowOverscroll" value="true" /&gt;
          &lt;preference name="BackupWebStorage" value="none" /&gt;
          &lt;preference name="target-device" value="handset" /&gt;
          &lt;preference name="StatusBarStyle" value="lightcontent" /&gt;
          &lt;feature name="StatusBar"&gt;
              &lt;param name="ios-package" onload="true" value="CDVStatusBar" /&gt;
          &lt;/feature&gt;
          &lt;icon height="57" src="resources/ios/icon/icon.png" width="57" /&gt;
          &lt;icon height="114" src="resources/ios/icon/icon@2x.png" width="114" /&gt;
          &lt;icon height="20" src="resources/ios/icon/icon-20@1x.png" width="20" /&gt;
          &lt;icon height="40" src="resources/ios/icon/icon-20@2x.png" width="40" /&gt;
          &lt;icon height="60" src="resources/ios/icon/icon-20@3x.png" width="60" /&gt;
          &lt;icon height="29" src="resources/ios/icon/icon-29@1x.png" width="29" /&gt;
          &lt;icon height="58" src="resources/ios/icon/icon-29@2x.png" width="58" /&gt;
          &lt;icon height="87" src="resources/ios/icon/icon-29@3x.png" width="87" /&gt;
          &lt;icon height="40" src="resources/ios/icon/icon-40@1x.png" width="40" /&gt;
          &lt;icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" /&gt;
          &lt;icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" /&gt;
          &lt;icon height="50" src="resources/ios/icon/icon-50@1x.png" width="50" /&gt;
          &lt;icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" /&gt;
          &lt;icon height="60" src="resources/ios/icon/icon-60@1x.png" width="60" /&gt;
          &lt;icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" /&gt;
          &lt;icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" /&gt;
          &lt;icon height="72" src="resources/ios/icon/icon-72@1x.png" width="72" /&gt;
          &lt;icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" /&gt;
          &lt;icon height="76" src="resources/ios/icon/icon-76@1x.png" width="76" /&gt;
          &lt;icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" /&gt;
          &lt;icon height="228" src="resources/ios/icon/icon-76@3x.png" width="228" /&gt;
          &lt;icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" /&gt;
          &lt;icon height="29" src="resources/ios/icon/icon-small@1x.png" width="29" /&gt;
          &lt;icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" /&gt;
          &lt;icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" /&gt;
          &lt;icon height="57" src="resources/ios/icon/icon-57@1x.png" width="57" /&gt;
          &lt;icon height="114" src="resources/ios/icon/icon-57@2x.png" width="114" /&gt;
          &lt;icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" /&gt;
          &lt;icon height="512" src="resources/ios/icon/iTunesArtwork@1x.png" width="512" /&gt;
          &lt;icon height="1536" src="resources/ios/icon/iTunesArtwork@3x.png" width="1536" /&gt;
          &lt;splash height="1242" src="resources/ios/splash/Default-1242@3x~iphone6s-landscape_2208x1242.png" width="2208" /&gt;
          &lt;splash height="2208" src="resources/ios/splash/Default-1242@3x~iphone6s-portrait_1242x2208.png" width="1242" /&gt;
          &lt;splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone_640x1136.png" width="640" /&gt;
          &lt;splash height="750" src="resources/ios/splash/Default-750@2x~iphone6-landscape_1334x750.png" width="1334" /&gt;
          &lt;splash height="1334" src="resources/ios/splash/Default-750@2x~iphone6-portrait_750x1334.png" width="750" /&gt;
          &lt;splash height="1496" src="resources/ios/splash/Default-Landscape@2x~ipad_2048x1496.png" width="2048" /&gt;
          &lt;splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad_2048x1536.png" width="2048" /&gt;
          &lt;splash height="748" src="resources/ios/splash/Default-Landscape~ipad_1024x748.png" width="1024" /&gt;
          &lt;splash height="2008" src="resources/ios/splash/Default-Portrait@2x~ipad_1536x2008.png" width="1536" /&gt;
          &lt;splash height="1024" src="resources/ios/splash/Default-Portrait~ipad_768x1024.png" width="768" /&gt;
          &lt;splash height="1004" src="resources/ios/splash/Default.png" width="768" /&gt;
          &lt;splash height="960" src="resources/ios/splash/Default@2x~iphone_640x960.png" width="640" /&gt;
          &lt;splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /&gt;
      &lt;/platform&gt;
      &lt;engine name="ios" spec="^4.5.4" /&gt;
      &lt;engine name="android" spec="^6.3.0" /&gt;
      &lt;plugin name="cordova-plugin-whitelist" spec="^1.3.3" /&gt;
      &lt;plugin name="cordova-plugin-screen-orientation" spec="^2.0.2" /&gt;
      &lt;plugin name="cordova-plugin-facebook4" spec="^1.9.1"&gt;
          &lt;variable name="APP_ID" value="[]" /&gt;
          &lt;variable name="APP_NAME" value="[]" /&gt;
      &lt;/plugin&gt;
      &lt;plugin name="cordova-plugin-device" spec="^1.1.7" /&gt;
      &lt;plugin name="cordova-plugin-statusbar" spec="^2.3.0" /&gt;
      &lt;plugin name="cordova-plugin-firebase" spec="~0.1.25" /&gt;
  &lt;/widget&gt;
  </code></pre>