今天用android studio在模拟器上运行程序总是出错,模拟器能起来,但程序一直安装运行不了,查看错误日志发现如下错误:
10:49 Emulator: [5228:9620:0808/104900.536:ERROR:ssl_client_socket_impl.cc(1050)] handshake failed; returned -1, SSL error code 1, net_error -103
10:49 Emulator: [5228:9620:0808/104900.613:ERROR:ssl_client_socket_impl.cc(1050)] handshake failed; returned -1, SSL error code 1, net_error -103
10:49 Emulator: [5228:9620:0808/104919.819:ERROR:ssl_client_socket_impl.cc(1050)] handshake failed; returned -1, SSL error code 1, net_error -103
10:49 Emulator: emulator: INFO: QtLogger.cpp:68: Critical: Uncaught ReferenceError: $ is not defined (qrc:/html/js/location-loader.js:1, (null))
10:49 Emulator: [5228:9620:0808/104919.824:ERROR:ssl_client_socket_impl.cc(1050)] handshake failed; returned -1, SSL error code 1, net_error -103
10:49 Emulator: emulator: INFO: QtLogger.cpp:68: Critical: Uncaught ReferenceError: $ is not defined (qrc:/html/js/location-loader.js:1, (null))
如图:
根据网上的方法试了很多,比如重启模拟器,配置变量等方法都未成功,最后看了一个帖子,问题得以解决,解决方法如下:
进入SDK中的platform-tools文件夹下打开cmd,我这里的路径为:E:\software\rj\bianji\Android\SDK\platform-tools,进入后输入cmd后按回车
即打开cmd窗口:
重启adb,输入如下命令:
adb kill-server
adb devices
版权声明:本文为Happy_change原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。