title: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to install all
body: <p>I am using React Native 0.26 and trying to play around with Google Plus Sign in from the below npm for Android application.</p>
  
  <pre><code>npm install react-native-google-signin --save
  </code></pre>
  
  <p>I am using command-line(react-native run-android) to build debug apks directly on my devices. </p>
  
  <p>Followed all the installation steps very carefully. By default, my builds are working only on Build tools version 1.2.3 on build.gradle(/android/) and it used to work for other projects but I am having the below error in this project because I had to include the below line in build.gradle file,</p>
  
  <p><code>classpath 'com.google.gms:google-services:2.1.0'</code> // &lt;--- add this</p>
  
  <p>and when I add this, I also have to modify the <code>distributionUrl</code> to <code>https\://services.gradle.org/distributions/gradle-2.13-all.zip</code> on <code>android/gradle/wrapper/gradle-wrapper.properties</code> </p>
  
  <p>After doing all the modifications when I tried to run the build command, it never installs the updated apk on the device and it is stuck at 99% progress.</p>
  
  <p><strong>Below is the detailed error</strong>,</p>
  
  <pre><code>Installing APK 'app-debug.apk' on 'Micromax Q372 - 5.0' for app:debug
  08:26:35 E/1526411097: Error while uploading app-debug.apk : Unknown failure ([CDS]close[0])
  Unable to install /home/sid/react/gplus/android/app/build/outputs/apk/app-debug.apk
  com.android.ddmlib.InstallException: Failed to install all 
  at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:91)
  
  ......
  
  :app:installDebug FAILED
  
  FAILURE: Build failed with an exception.
  
  What went wrong:
  Execution failed for task ':app:installDebug'.
  
  com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to install all
  Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  </code></pre>