title: EmptyThrowable: The APK file *.apk does not exist on disk
body: <p>This is an Android application using gradle. After clicking <kbd>Run</kbd>, I found <code>APP_V1.3.4_2016-02-22_</code><strong><code>11:30:29</code></strong><code>_google_play.apk</code> in <code>outputs/apk</code>, but the event log says:</p>
  <blockquote>
  <p>11:30:31 EmptyThrowable: The APK file /.../WorkSpace/Android/.../app/build/outputs/apk/APP_V1.3.4_2016-02-22_<strong>11:30:14</strong>_google_play.apk does not exist on disk.</p>
  <p>11:30:32 Session 'app': Error Installing APK</p>
  </blockquote>
  <p>Here is my <code>build.gradle</code> file:</p>
  <pre><code>apply plugin: 'com.android.application'
  
  def releaseTime() {
      return new Date().format(&quot;yyyy-MM-dd_HH:mm:ss&quot;,
          TimeZone.getTimeZone(&quot;GMT+08:00&quot;))
  }
  
  android {
      compileSdkVersion 'Google Inc.:Google APIs:23'
      buildToolsVersion &quot;23.0.2&quot;
  
      defaultConfig {
          applicationId &quot;com.example&quot;
          minSdkVersion 14
          targetSdkVersion 23
          versionCode 29
          versionName &quot;1.3.4&quot;
          manifestPlaceholders = [SOME_CHANNEL_VALUE: &quot;some_channel&quot;]
          testInstrumentationRunner &quot;android.support.test.runner.AndroidJUnitRunner&quot;
      }
      signingConfigs {
          debug {}
  
          release {
              // ...
          }
      }
  
      buildTypes {
          debug {
              zipAlignEnabled true
              minifyEnabled false
              shrinkResources true
          }
  
          release {
              zipAlignEnabled true
              minifyEnabled true
              shrinkResources true
              proguardFiles getDefaultProguardFile('proguard-android.txt'),
                  'proguard-rules.pro'
              signingConfig signingConfigs.release
  
              applicationVariants.all { variant -&gt;
  
                  def time = releaseTime()
  
                  variant.outputs.each { output -&gt;
                      def apk = output.outputFile
                      def endFileName = &quot;${time}_${variant.productFlavors[0].name}.apk&quot;
  
                      if (apk != null &amp;&amp;
                          apk.name.endsWith('.apk') &amp;&amp;
                          !apk.name.endsWith('${endFileName}')) {
                          def fileName = &quot;APP_V${defaultConfig.versionName}_${endFileName}&quot;
                          output.outputFile = new File(apk.parentFile, fileName)
                      }
                  }
              }
          }
      }
  
      productFlavors {
          google_play {
              manifestPlaceholders = [SOME_CHANNEL_VALUE: &quot;google_play&quot;]
          }
      }
  }
  
  dependencies {
      // ...
  }
  </code></pre>
  <p>So is there any wrong with <code>releaseTime()</code>?</p>