工具:
- Android Studio 2.3
- Firebase
测试设备:
Samsung GT-I9505
Samsung SM-T211
设备操作系统:
- Android 5.0
问题: 我的安卓设备无法安装我的应用,一直在排查出了什么问题。
显示错误信息:
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?
显示的事件日志:
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
发现奇怪的事件
我还没有在我的设备上安装我的应用程序,但它显示我应该卸载我的应用程序。
当将APK安装到我的实体设备上时,我发现它会离线然后再次联机。我不知道是什么原因引起了这种行为。
我已经做过的事情
检查了开发者选项中的设备设置以允许USB调试
检查了我的Sha-1,我的包名是否被正确注册到Firebase控制台
在我的设备应用程序管理器中检查我的应用程序是否已安装,但我无法看到它
重启了我的电脑,也许它正在经历ADB缓存问题。我已在任务管理器中删除了它,但问题仍未解决。
希望您能认真考虑。谢谢。