Unity无法列出目标平台 [英] Unity unable to list target platforms
问题描述
我在Unity上有些新工作,并且开发了VR游戏,一切顺利,直到我尝试在构建设置"中创建apk为止.我收到此错误:
I'm a little bit new working on Unity and I've developed a VR game, everything goes well until I try to create the apk in the Build Settings. I got this error:
控制台登录统一为:
我搜索了相同的主题,并尝试替换sdk根目录下的"Tools"文件夹,但仍然遇到问题.如果有人可以帮助我,我将不胜感激.
I've searched the same topic and tried replacing the "Tools" folder of my sdk root but still got the problem. If anyone can help me I would appreciate it.
推荐答案
我有相同的错误.我必须设置一些环境变量并重新启动Unity才能使其正常工作:
I had the same error. I had to set some environment variables and restart Unity in order to get it to work:
- 将环境变量
JAVA_HOME
设置为JDK位置. - 将环境变量
ANDROID_HOME
设置为Android SDK位置. - 将环境变量
ANDROID_NDK_HOME
设置为Android NDK位置. - 将JDK工具目录添加到您的
PATH
中,即C:\ Program Files \ Android Studio \ jre \ bin.
- Set the environment variable
JAVA_HOME
to the JDK location. - Set the environment variable
ANDROID_HOME
to the Android SDK location. - Set the environment variable
ANDROID_NDK_HOME
to the Android NDK location. - Add the JDK tools directory to your
PATH
, ie C:\Program Files\Android Studio\jre\bin.
It looks like you're on a Mac, so to set environment variables, see How do I set environment variables on OS X?
要在Windows 10中编辑环境变量,请执行以下操作:Windows设置>查找设置>为您的帐户编辑环境变量(或编辑系统环境变量).
To edit environment variables in Windows 10: Windows Settings > Find a setting > Edit environment variables for your account (or Edit the system environment variables).
这篇关于Unity无法列出目标平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!