unity发布android包

2019-04-14 08:29发布

1、电脑中下载并安装JDK 2、下载SDK,下载地址:http://developer.android.com/sdk/index.html   Android的SDK会经常更新,不过Unity有可能不支持最新版的SDK,   环境变量中配置SDK,将platform-tools和tools的路径添加到系统变量pah中; 3、Unity设置   Edit->preferences->External Tools->Android SDK Location  设置为SDK放的地址   Build Setting->  Play Setting - > Other Setting    修改Buddle Identifier (按照格式自己取名) Instal Location 设置成Automatic Api Compatibility Level 改成 .NET 2.0  然后就可以build成一个apk程序了。  在build 的过程中遇到了两个问题: 1、Error building Player: Exception: android (invokation failed) ERROR: unknown error cmd:android list  解决方法: 将sdkuild-tools17.0.0文件中下面的内容复制到sdkplatform-tools文件夹中,就可以了 2、Error building Player:ArgumentEXception: Illegal characters in path; 主要是unity不支持最新版本的SDK.换一个SDK 就行了