教室安裝unity要build apk的問題。
Unity版本:2017.3.0f3
問題1:
錯誤訊息:"CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. C:/Users/User/AppData/Local/Android/Sdk\tools\bin\avdmanager.bat list target -c...."
請參考:
https://starloveunity.wordpress.com/2017/08/25/unity-build-apk-%E5%95%8F%E9%A1%8C%E6%95%B4%E7%90%86/
解決:
1.下載Download Android SDK Tools, Revision 25.2.5 (January 2017):
http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip
2.解壓 覆蓋原來Android SDK 下的 tools資料夾
C:\Users\User\AppData\Local\Android\sdk
C:\Users\User\AppData\Local\Android\sdk
問題2:
錯誤訊息:
"CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk-9.0.4\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
"
解決:
原來安裝: jdk-9.0.4_windows-x64_bin
Java SE Development Kit 8u161<----OK,其他版本未知。
2.記得要改路徑
沒有留言:
張貼留言