Unity 构建异常:可能 SDK 是只读的

Seb*_*Seb 6 android unity-game-engine

在构建我的 2D 手机游戏时(它只是一架飞机,上面还没有任何东西),我收到一个错误,其中包含 5 个异常,全部以Probably the SDK is read-only

以下是完整的例外情况:

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Run Code Online (Sandbox Code Playgroud)

小智 1

尝试阅读论坛中的对话

这里

我认为他们也有和你类似的问题。也许他们提到的一些解决方案可能适合您。但是是否尝试过创建和构建新的统一项目或构建以前的项目?如果显示只读,则可能是权限问题。尝试使用管理员权限打开 Unity。

如果这不起作用,请尝试使用 Unity Hub 和 Android(Unity + Android)重新安装 Unity。我曾经通过这样做解决了类似的问题。

希望我能有所帮助。祝你好运。