Rumah > Java > javaTutorial > teks badan

Mengapa Saya Tidak Boleh Membina untuk Android dalam Unity: Ralat 'Tidak Dapat Menyenaraikan Platform Sasaran'?

Barbara Streisand
Lepaskan: 2024-11-13 14:13:02
asal
780 orang telah melayarinya

Why Can't I Build for Android in Unity: Error

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.
Salin selepas log masuk

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.

Atas ialah kandungan terperinci Mengapa Saya Tidak Boleh Membina untuk Android dalam Unity: Ralat 'Tidak Dapat Menyenaraikan Platform Sasaran'?. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Artikel terbaru oleh pengarang
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan