很抱歉,长篇文章。我一直试图在Android
中构建我的Unity 2018.2.8f1
应用,但是当我按“ Build and Run”时,我不断收到以下错误消息:
无法检索设备属性。请确保已安装Android SDK,并在编辑器中对其进行了正确配置。有关更多详细信息,请参见控制台。
这是控制台日志
UnityEditor.BuildPlayerWindow + BuildMethodException:2个错误 在C:\ buildslave \ unity \ build \ Editor \ Mono \ BuildPlayerWindowBuildMethods.cs:187中的UnityEditor.BuildPlayerWindow + DefaultBuildMethods.BuildPlayer(BuildPlayerOptions选项)[0x0021f] 在C:\ buildslave \ unity \ build \ Editor \ Mono \ BuildPlayerWindowBuildMethods.cs:94中的UnityEditor.BuildPlayerWindow.CallBuildMethods(布尔askForBuildLocation,BuildOptions defaultBuildOptions)[0x0007f] UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)
构建完成,结果为“失败” UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)
AND
CommandInvokationFailure:无法检索设备属性。请确保已安装Android SDK,并在编辑器中对其进行了正确配置。有关更多详细信息,请参见控制台。 C:/ Users / cconn / AppData / Local / Android / Sdk \ platform-tools \ adb.exe -s“ 90e26bcd” shell getprop stderr [ 错误:设备未经授权。 未设置此adb服务器的$ ADB_VENDOR_KEYS 如果这看起来不对,请尝试使用“ adb kill-server”。 否则,请检查设备上的确认对话框。 ] 标准输出[] 退出代码:1 UnityEditor.Android.Command.WaitForProgramToRun(UnityEditor.Utils.Program p,UnityEditor.Android.WaitingForProcessToExit等待ForProcessToExit,System.String errorMsg) UnityEditor.Android.Command.Run(System.Diagnostics.ProcessStartInfo psi,UnityEditor.Android.WaitingForProcessToExit等待ForProcessToExit,System.String errorMsg) UnityEditor.Android.ADB.RunInternal(System.String []命令,UnityEditor.Android.WaitingForProcessToExit,waitingForProcessToExit,System.String errorMsg) UnityEditor.Android.ADB.Run(System.String []命令,UnityEditor.Android.WaitingForProcessToExit等待ForProcessToExit,System.String errorMsg) UnityEditor.Android.AndroidDevice.Exec(System.String []命令,System.String errorMsg) UnityEditor.Android.AndroidDevice.get_Properties() UnityEditor.Android.AndroidDevice..ctor(UnityEditor.Android.ADB adb,System.String deviceId) UnityEditor.Android.AndroidDeviceInfo..ctor(UnityEditor.Android.ADB adb,System.String deviceID) UnityEditor.Android.PostProcessor.Tasks.CheckDevice.CheckForInactiveDevices(UnityEditor.Android.ADB adb,System.Collections.Generic.List`1设备) UnityEditor.Android.PostProcessor.Tasks.CheckDevice.GetTargetDevices(UnityEditor.Android.ADB adb) UnityEditor.Android.PostProcessor.Tasks.CheckDevice.Execute(UnityEditor.Android.PostProcessor.PostProcessorContext上下文) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks(UnityEditor.Android.PostProcessor.PostProcessorContext上下文) UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)
我尝试过的事情:
SDK Tool
设置(https://i.stack.imgur.com/qnIzo.png)tools_r25.2.5-windows
文件夹替换“ tools”文件夹Unity
Unity
,并尝试自动下载最新版本的Android SDK
SDK
中正确设置了JDK
和Unity
路径adb.exe
进程在此先感谢任何可以提供帮助的人。