简体   繁体   English

在Android Studio 2.3中安装apk时出错

[英]Error Installing apk in Android Studio 2.3

Tools: 工具:

  • Android Studio 2.3 Android Studio 2.3
  • Firebase 火力地堡

Device Tested 设备测试

  • Samsung GT-I9505 三星GT-I9505

  • Samsung SM-T211 三星SM-T211

Device OS: 设备OS:

  • Android 5.0 Android 5.0

Problem: I can't install my app on my android device. 问题:我无法在我的Android设备上安装我的应用程序。 Been troubleshooting what goes wrong. 一直在排除故障。

Display Error Message: 显示错误消息:

Installation failed with message device 'a408a2f4' not found.
It is possible that this issue is resolved by uninstalling 
an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

Displayed Event Log: 显示的事件日志:

11:38 AM    An existing connection was forcibly closed by the remote host
                    java.io.IOException: An existing connection was forcibly closed by the remote host
                    at sun.nio.ch.SocketDispatcher.read0(Native Method)
                    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
                    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
                    at sun.nio.ch.IOUtil.read(IOUtil.java:197)
                    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
                    at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:492)
                    at com.android.ddmlib.SplitApkInstaller.uploadApk(SplitApkInstaller.java:152)
                    at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:78)
                    at com.android.ddmlib.Device.installPackages(Device.java:904)
                    at com.android.tools.idea.run.tasks.SplitApkDeployTask$SplitApkInstaller.installApp(SplitApkDeployTask.java:117)
                    at com.android.tools.idea.run.RetryingInstaller.install(RetryingInstaller.java:86)
                    at com.android.tools.idea.run.tasks.SplitApkDeployTask.perform(Spl... (show balloon)

11:38 AM    Session 'app': Error Installing APKs

Weird Event seen 看到奇怪的事件

  • I haven't had installed my app in my device yet it is displaying that i should uninstall my app. 我还没有在我的设备中安装我的应用程序,但它显示我应该卸载我的应用程序。

  • I've seen that when installing APK to my physical device goes offline and goes back to online. 我已经看到,当安装APK到我的物理设备时,它会脱机并重新上线。 I don't know what is causing this behavior. 我不知道是什么导致了这种行为。

What I've done so far 到目前为止我做了什么

  • Checked my device settings in the developer options to allow usb debugging 检查开发人员选项中的设备设置以允许USB调试

  • Checked my Sha-1 my package name it is being correctly registered to Firebase Console 检查了我的Sha-1我的包名称,它已正确注册到Firebase控制台

  • Checked in my Device Application Manager if my app is being installed but i can't see it 检查我的设备应用程序管理器是否正在安装我的应用程序,但我看不到它

  • Restarted my PC maybe it is experiencing cache issues on ADB. 重启我的电脑可能是在ADB上遇到缓存问题。 I had deleted it in task manager but not resolving. 我在任务管理器中删除了它但没有解决。

Hoping for your utmost consideration. 希望你能得到最大的考虑。 Thank You. 谢谢。

i had same problem today after update to android studio 2.3 我更新到android studio 2.3后,今天遇到了同样的问题

i just downgrade build:gradle version from 2.3.0 to 2.2.3 and solve my problem 我只是将build:gradle版本从2.3.0降级到2.2.3并解决了我的问题

buildscript {
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3' // downgrade to this version
    }
}

This is worked for me: 这对我有用:

I had same problem earlier. 我之前遇到过同样的问题。 After long research it fixed by a small thing.I just uninstalled the driver of mobile in PC and changed the port to connect with that device. 经过长时间的研究,它由一个小东西修复。我刚刚卸载了PC中的移动驱动程序并更改了端口以连接该设备。 I think some problem with the port in my PC.It might be helpful to you. 我认为我的电脑中的端口存在一些问题。它可能对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM