gpt4 book ai didi

android - com.android.builder.testing.api.DeviceException : com. android.ddmlib.InstallException:无法安装全部

转载 作者:行者123 更新时间:2023-12-03 03:01:57 28 4
gpt4 key购买 nike

我正在使用 React Native 0.26 并尝试使用 Google Plus 从下面的 Android 应用程序 npm 登录。

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'//<--- 添加此

当我添加此内容时,我还必须将 distributionUrl 修改为 https\://services.gradle.org/distributions/gradle-2.13-all.zipandroid/gradle/wrapper/gradle-wrapper.properties

当我尝试运行构建命令时,完成所有修改后,它永远不会在设备上安装更新的 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

最佳答案

我在尝试在特定设备上安装 APK 时遇到了同样的问题。

为了解决这个问题,我用 adb devices 列出了所有已连接的设备,并确定了正确的设备,然后运行 ​​run-android 指定设备 ID:

react-native run-android --deviceId MY-DEVICE-ID

关于android - com.android.builder.testing.api.DeviceException : com. android.ddmlib.InstallException:无法安装全部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37779171/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com