简体   繁体   English

Unity错误:导出到Android

[英]Unity Error: Exporting to Android

I have the following error, when I export to Android from Unity: 从Unity导出到Android时出现以下错误:

Error building Player: Win32Exception: ApplicationName='C:/Users/joaog_000/AppData/Local/Android/android-sdk\\tools\\aapt.exe', CommandLine='package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/joaog_000/AppData/Local/Android/android-sdk\\platforms\\android-15\\android.jar" -F bin/resources.ap_', CurrentDirectory='Temp/StagingArea' 生成播放器错误:Win32Exception:ApplicationName ='C:/ Users / joaog_000 / AppData / Local / Android / android-sdk \\ tools \\ aapt.exe',CommandLine ='package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S“ res” -I“ C:/ Users / joaog_000 / AppData / Local / Android / android-sdk \\ platforms \\ android-15 \\ android.jar” -F bin / resources.ap_ ',CurrentDirectory ='Temp / StagingArea'

What can I do? 我能做什么?

Check whether android sdk is properly installed. 检查android sdk是否已正确安装。 The error says that the aapt.exe is missing from the sdk\\tools Check and add it to the sdk and then rebuild the project. 该错误表明sdk \\ tools中缺少aapt.exe 。检查并将其添加到sdk中,然后重新生成项目。

Things you could do: 您可以做的事情:

  1. Have you installed the java and android SDKs? 您是否已安装Java和Android SDK? If no, install them. 如果没有,请安装它们。
  2. Did you set the location of the Android SDK in Edit/Preferences? 您是否在“编辑/首选项”中设置了Android SDK的位置?
  3. Clear the temp folder, restart Unity and try again. 清除临时文件夹,重新启动Unity,然后重试。
  4. Search for the aapt.exe file from other android versions \\android-XX\\ and copy to the stated \\android-15\\ in your error. 从其他Android版本\\ android-XX \\中搜索aapt.exe文件,并在错误中复制到指定的\\ android-15 \\。
  5. Launch your SDKManager and check for updates. 启动您的SDKManager并检查更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM