[英]No abbility to debug Unity app on the android device / Debug and profiler cannot connect to the phone correctly
My problems is:我的问题是:
And in the same time:同时:
What I have done:我做了什么:
Development build; Autoconnect profiling; scripts debugging;
Development build; Autoconnect profiling; scripts debugging;
Development build; Autoconnect profiling; scripts debugging;
is enabled ADB can see the phone without any issues: ADB 可以毫无问题地看到电话:
C:\\Users\\UKS2\\AppData\\Local\\Android\\Sdk\\platform-tools> adb devices List of devices attached a616d3d10204 device
Additional information:附加信息:
What did I miss?我错过了什么?
I think that Unity for some reason trying to connect to the phone by some incorrect way/adress/port after app install.我认为 Unity 出于某种原因试图在应用程序安装后通过某种不正确的方式/地址/端口连接到手机。 But how to fix this?
但是如何解决这个问题? And why it's have no problems in install app process in this case?
为什么在这种情况下安装应用程序过程没有问题?
It's sounds like a joke.这听起来像个笑话。 Problem was in Firewall.
问题出在防火墙上。
Few days with this problem I have think that Firewall is disabled on my computer.几天出现这个问题,我认为我的计算机上禁用了防火墙。
But it wasn't.但事实并非如此。
This works for iPhone too!这也适用于 iPhone!
Would like to add to the answer by Andrew, because it I couldn't realise the proper way to disable it entirely .想补充安德鲁的答案,因为我无法意识到完全禁用它的正确方法。 Disable the firewall like this:
像这样禁用防火墙:
On Windows 10: Windows Defender Firewall with Advanced Security --> Overview --> Windows Defender Firewall Properties:在 Windows 10 上:具有高级安全性的 Windows Defender 防火墙 --> 概述 --> Windows Defender 防火墙属性:
In there I had to set Firewall State to 'off' for both Domain Profile, Private Profile and Public Profile tabs.在那里,我必须将域配置文件、私有配置文件和公共配置文件选项卡的防火墙状态设置为“关闭”。 (perhaps not all were needed, but was short on time, so didn't experiment).
(也许不是所有都需要,但时间不够,所以没有试验)。 Disabling all can expose your pc, making it vulnerable.
全部禁用可能会暴露您的电脑,使其容易受到攻击。
Also, double check that the wifi is enabled on the actual device (phone) and that you are connected to the same router as your computer.此外,请仔细检查实际设备(手机)上是否启用了 wifi,并且您是否连接到与计算机相同的路由器。 The USB wire between to PC wasn't enough!
到 PC 之间的 USB 线是不够的!
Perhaps might be worth to launch your console in Administrator mode (I always do by default)也许值得以管理员模式启动您的控制台(默认情况下我总是这样做)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.