发布的一些坑
打包未能找到gradle、sdk、jdk
分别需要对应单独安装且版本必须合适(jdk1.8才可以的)gradle配置环境有误
尝试了利用andriod studio安装的办法,外网特别慢,推荐直接本地安装gradle。
gradle配置环境变量时候由于没有搞清楚优先级的问题,直接去配置了bash profile导致命令全部失效。
-bash: ls: command not found
yuanxindeMBP:/ yuanxin$ ls
-bash: ls: command not found
发现是由于bash profile重复覆盖导致:
yuanxindeMBP:~ yuanxin$ ls
AndroidStudioProjects MacKeeper Backups
Applications Movies
Applications (Parallels) Music
Deleted Next
Desktop Parallels
Documents Peter group
Downloading Peter group.save
Downloads Pictures
Homebrew Public
Installation PycharmProjects
Library This
yuanxindeMBP:~ yuanxin$ ls -a
. .sogouinput
.. .viminfo
.CFUserTextEncoding AndroidStudioProjects
.DS_Store Applications
.ShadowsocksX-NG Applications (Parallels)
.Trash Deleted
.android Desktop
.bash_history Documents
.bash_profile Downloading
.bash_profile.save Downloads
.bash_profile.save.1 Homebrew
.bash_profile.swp Installation
.bash_sessions Library
.config MacKeeper Backups
.gradle Movies
.idlerc Music
.keras Next
.local Parallels
.matplotlib Peter group
.mono Peter group.save
.oracle_jre_usage Pictures
.profile Public
.profile.pysave PycharmProjects
.snipaste This
yuanxindeMBP:~ yuanxin$ rm .bash_profile.save
yuanxindeMBP:~ yuanxin$ rm .bash_profile.save.1
解决办法输入:(Remove掉原来默认保存的save1,save配置回原来的环境的变量)
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
查官网发现这东西是跟我mac的优先级配置有关:
yuanxindeMBP:~ yuanxin$ vi /etc/profile 是在这个里面修改优先级别
yuanxindeMBP:~ yuanxin$ sudo !!
sudo vi /etc/profile #更改需要管理员权限
Password:
yuanxindeMBP:~ yuanxin$ sudo vi /etc/profile
yuanxindeMBP:~ yuanxin$ source /etc/profile
yuanxindeMBP:~ yuanxin$ gradle
Starting a Gradle Daemon (subsequent builds will be faster)
写法
-- INSERT -- W10: Warning: Changing a readonly file
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
GRADLE_HOME=/usr/local/etc/gradle-4.1
export GRADLE_HOME
export PATH=${PATH}:${GRADLE_HOME}/bin
基于bash-profile配置的,etcprofile类似。
https://blog.csdn.net/u014005316/article/details/54927510
- 兼容性问题
Incompatiblegraphics API detected! Please uncheck "Auto Graphics API" (if notdone by EasyAR) and rebuild, or EasyAR may not work as expected (e.g. whitescreen).
UnityEngine.Debug:LogError(Object)
PostBuild:OnPostprocessBuild(BuildTarget,String) (at Assets/EasyAR/Scripts/Editor/PostBuild.cs:67)
UnityEditor.HostView:OnGUI()
在PlayerSettings->OtherSetting中Auto Graphics API后的选框选中后再取消就可以了
发布权限的问题。
保持key和company,packagename都和官网申请的一致。-
全局的视野。
养成把资源放在全局的习惯。
养成良好的文件管理习惯。
shift+command+g 访问指定目录。
放在usr/local/ect蛮好的