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里找到这个文件,将其拷贝到之前的目录,就解决啦。



你可能感兴趣的:(学习,unity3d,发布,安卓)