Unity+Android 遇到的问题小记

参考文章:unity+Android交互 - WalkingSnail - 博客园  https://www.cnblogs.com/WalkingSnail/p/14525538.html

问题1如下图:

 

解决方案更新Android studio版本,更新到Android studio3.0版本,原版本为2.3

问题2:

Error:Failed to find target with hash string 'android-26'

解决方案:Error:Failed to find target with hash string 'android-26'-CSDN论坛  https://bbs.csdn.net/topics/392371167

File—>Project Structure
修改Properties的Compile Sdk Version
Flavors 的target SDK version

更改到已经下载好的sdk

 

 

 

 

 

 

 

 后面有提示缺少build_tools 26.0.2

直接点击链接下载就行

 

 

 

 打包遇到问题:在unity中无法与Android通讯。

创建和unity交互的Moudle项目时,Packege Name 要编辑,重新写的。

 

 后面新建类也要用到,

 

 

 

 

 

unity中也要用到

 

 后面按照上一篇文档操作即可。

操作成功截图:

 

 

 

 

 

 

 

 

.arr文件位置

D:\WQJ\TestApplication

 

 

\testunityandroid\build\outputs\aar

posted @ 2021-03-15 18:27  WalkingSnail  阅读(171)  评论(0)    收藏  举报