Mr.Alright---Unity 3D直接将游戏运行到安卓手机上

遇到了两个问题

1.CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.

我的SDK路径明明是完全正确的,却报错了,这是为什么呢?

 

原因:Unity 在编译时会调用 Android SDK tools 中的 android 命令,而在新版本的 Android SDK tools 中,android这个命令已经废弃了,导致 Unity 无法正常编译(我的 Android SDK tools 版本是 25.3.1 )

 

解决:到官网下载以前版本的sdk-tools,把自己的原来的备份一下,将下载好的改名成tools放在sdk根目录下就好了

 

2.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,把这个改了就好了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值