1. 程式人生 > >Unity3D釋出安卓時遇到的問題解決辦法

Unity3D釋出安卓時遇到的問題解決辦法

在用Unity3D釋出安卓時遇到了兩個問題,在此記錄下解決辦法:

第一個:

錯誤提示:

Error building Player: UnityException: Bundle Identifier has not been set up correctly
Please set the Bundle Identifier in the Player Settings. The value must follow the convention 'com.YourCompanyName.YourProductName' and can contain alphanumeric characters and underscore.
Each segment must not start with a numeric character or underscore.

解決方法:

開啟File=>build settings => player settings=>在Inspector找到Bundle Identifier 選項,原來是:com.YourCompanyName.YourProductName

後兩項改個名字就行了

第二個:

錯誤提示:

Error building Player: Win32Exception: ApplicationName='D:/android/android-sdk-windows-1.6_r1\tools\zipalign.exe', CommandLine='4 "C:\Users\Administrator.OTCITZ1YGXVV59Z\Documents\New Unity Project 1\Temp/StagingArea/Package_unaligned.apk" "C:\Users\Administrator.OTCITZ1YGXVV59Z\Documents\New Unity Project 1\Temp/StagingArea/Package.apk"', CurrentDirectory='Temp/StagingArea'

解決方法:

你會發現D:/android/android-sdk-windows-1.6_r1\tools\目錄下面並沒有zipalign.exe這個可執行檔案,所以在D:\android\android-sdk-windows-1.6_r1\build-tools\20.0.0裡找到這個檔案,將其拷貝到之前的目錄,就解決啦。