I am using React Native 0.26 and trying to play around with Google Plus Sign in from the below npm for Android application.
npm install react-native-google-signin --save
I am using command-line(react-native run-android) to build debug apks directly on my devices.
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,
classpath 'com.google.gms:google-services:2.1.0' // <— add this
and when I add this, I also have to modify the
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.
Below is the detailed error,
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) 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
I had the same issue trying to install an APK on a specific device.
To solve I listed all the connected devices with
adb devices and I identified the right one, then I ran
run-android specifying the device ID:
react-native run-android --deviceId MY-DEVICE-ID