当我在设备Redmi 3s prime中安装Android应用时出现错误,并且它在genymotion模拟器上运行 [英] I am getting error when i install my Android app in device Redmi 3s prime, and it is working on genymotion emulator
问题描述
我遇到此错误:
$ adb推送 F:\ skylixwork \ CollagePhoto \ app \ build \ outputs \ apk \ app-debug.apk
/data/local/tmp/com.collagephoto java.io.IOException:现有 远程主机强行关闭了连接
发生错误时 安装APK
$ adb push F:\skylixwork\CollagePhoto\app\build\outputs\apk\app-debug.apk
/data/local/tmp/com.collagephoto java.io.IOException: An existing connection was forcibly closed by the remote host
Error while Installing APK
安装失败,并显示消息INSTALL_CANCELED_BY_USER
.
可以通过卸载apk的现有版本(如果存在)然后重新安装来解决此问题.
Installation failed with message INSTALL_CANCELED_BY_USER
.
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?
推荐答案
我找到了问题的答案.
解决方案:-(1)
启用开发人员模式-在您的手机中,依次转到设置",关于手机",然后单击MIUI版本7次.您会看到一个弹出窗口,提示您现在是开发人员.
enable developer mode - In your phone, go to Settings, About phone and click on MIUI version 7 times. You’ll see a pop up which says you are a developer now.
返回设置",其他设置",开发者"选项并启用USB调试.
Go back to Settings, Additional settings, Developer options and enable USB Debugging.
将手机连接到PC/Mac,并在手机上授权计算机
Connect your phone to your PC/Mac and on the phone authorize your computer
返回开发人员"选项,向下滚动以找到打开MIUI优化"并将其禁用.您的手机将重新启动
go back to Developer options, scroll down to find Turn on MIUI optimization and disable it. Your phone will be rebooted
解决方案:-(2)
启用开发人员模式-在您的手机中,依次转到设置",关于手机",然后单击MIUI版本7次.您会看到一个弹出窗口,提示您现在是开发人员.
enable developer mode - In your phone, go to Settings, About phone and click on MIUI version 7 times. You’ll see a pop up which says you are a developer now.
返回设置",其他设置",开发者"选项并启用USB调试.
Go back to Settings, Additional settings, Developer options and enable USB Debugging.
将手机连接到PC/Mac,然后在手机上授权计算机.
Connect your phone to your PC/Mac and on the phone authorize your computer.
返回开发人员"选项,向下滚动以找到Install via USB
:并将其打开.
go back to Developer options, scroll down to find Install via USB
: and just turn on it.
这篇关于当我在设备Redmi 3s prime中安装Android应用时出现错误,并且它在genymotion模拟器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!