Error: Unable to List Target Platforms
When attempting to build an Android project in Unity, users may encounter the following error:
Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
로그인 후 복사
This error typically occurs due to an incorrect Android SDK path or outdated SDK components. To resolve this issue, follow the steps outlined below:
Solution 1: Verify Android SDK Path
- Ensure that the Android SDK path in Unity Editor's Preferences is correct.
- If the SDK path contains spaces, move the SDK to a location without spaces and update the path accordingly.
Solution 2: Update Android SDK
- Uninstall the current Android SDK and download and install the latest version from the Android Developers website.
- Update the Android SDK path in Unity Editor's Preferences.
Solution 3: Download Specific SDK Version
- For Windows: Download "tools_r25.2.3-windows.zip" and unzip it.
- For MacOSX: Download "tools_r25.2.3-macosx.zip" and unzip it.
- Add the path of the unzipped SDK to Unity's External Tools -> SDK box.
Additional Tips:
- If the issue persists, uninstall Android SDK Tools 25 and 26, as well as SDK Platform-Tools and SDK Tools with higher version numbers.
- Use older version numbers for these components if possible.
- Update Unity Editor to the latest version, as the issue may be resolved in newer builds.
위 내용은 Unity에서 Android용으로 빌드할 수 없는 이유: '대상 플랫폼을 나열할 수 없습니다' 오류?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!