【发布时间】:2016-10-13 05:56:20
【问题描述】:
我正在使用 React Native 0.26 并尝试从以下 npm for Android 应用程序使用 Google Plus 登录。
npm install react-native-google-signin --save
我正在使用命令行(react-native run-android)直接在我的设备上构建调试 apk。
非常仔细地遵循所有安装步骤。默认情况下,我的构建仅适用于 build.gradle(/android/) 上的构建工具版本 1.2.3,它曾经适用于其他项目,但我在这个项目中遇到以下错误,因为我必须包含以下行在 build.gradle 文件中,
classpath 'com.google.gms:google-services:2.1.0' //
当我添加这个时,我还必须将android/gradle/wrapper/gradle-wrapper.properties 上的distributionUrl 修改为https\://services.gradle.org/distributions/gradle-2.13-all.zip
在我尝试运行 build 命令进行所有修改后,它从未在设备上安装更新的 apk,并且卡在 99% 的进度。
以下是详细错误,
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
【问题讨论】:
-
你解决了吗?
标签: android gradle react-native apk ubuntu-14.04