androidstudio 2020.3.1 折腾记录
mac电脑升级Android studio 2020.3.1
直接客户端升级,发现很顺利成功了,但是高兴太早了,一堆问题随之而来。

kotlin相应的也需要更新到新版本,可是在androidstudio下载plugin的时候一直失败

无奈只能尝试本地下载
https://plugins.jetbrains.com/plugin/6954-kotlin/versions

下载比较慢,下载完成后进入Android studio的plugin,如图点击,选择下载得到一个zip包

好不容易kotlin下载好了,悲催的是,发现升级升坏了 Missing essential plugin: org.jetbrains.android Please reinstall Android Studio from scratch

尝试macos在终端输入已下命令,发现无法解决问题,如果你也碰到问题,可以先尝试已下:
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
rm -Rf ~/Library/Caches/AndroidStudio*
Windows:删除config目录下的文件:
C:\Users\admin\.AndroidStudio4.0\config
无奈没找到方法,只能直接从官网下载重新覆盖安装。
https://developer.android.google.cn/studio/
卸载了老版本,发现新版本安装不了。一点提示也没有,那只能进入安装包的content文件里面,用cmd运行

报下面的错误(建议不要先卸载老版本)
OpenJDK 11.0.10” couldn’t be loaded because it doesn’t contain a version for the current architecture

查看本地版本,发现还是8,为什么需要11?

难道这个新版本还要支持OpenJDK 11???能否修改??
去查看Android Studio的配置文件 info.plist,进入安装包的查看

contents里面是对的,是不是找错了?

但是我们看到上面的报错提到的一个路径Contents/jre ???

xcode打开更加清晰

mac jdk多版本切换
折腾完仍然不行,看了下包名才发现,从官网下的竟然是arm包!!!
不带这么坑的吧。于是选择其他版本下载,发现报错下不下来,于是只能找第三方的网址下载了。
一直在使用的mac第三方下载
进入之后直接搜索Android即可。
终于可以安装了。。。。
不要直接点击安装,它们这种都是外面套了一层壳,一般可能安装不上,可以点击新手必读,找到真正的安装包。

点击如图的包安装即可。

安装成功。

直接将程序拖到用户的应用程序目录,然后就可以看到我们的app桌面的图标了,


windows电脑折腾记录
直接升级基本都是报错,jre覆盖不了,删掉了也不行。只能也是重新下载安装。
好在windows顺利安装成功了,然后启动工程,执行flutter doctor报错, unable to find git in your path 而且提示C:\Windows\System32\where.exe提升权限。
检查了环境变量,发现path配置C:\Windows\System32;是存在的,应该不是路径问题,有可能是androidstudio权限问题。
找到Androidstudio的快捷方式

高级属性勾选用管理员身份运行

再次执行flutter doctor正常了。
flutter doctor 里面有下面的错误
android-studio-dir = C:\Program X Android Studio not found at C:\Program FLUTTER PROBLEM
原因是以前更改过Android studio的名字和目录,现在卸载重装之后,名字不一样了。根据
注意上面的写的命令要去掉空格和加双引号.
下面是直接上面的stackoverflow答案里面copy的,是有问题的
flutter config --android-studio-dir = C:\Program Files\Android\Android Studio
正确的应该是=号两边不要有空格,而且路径用双引号包裹
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
一切正常了。
layout inspector模糊问题
对于Legacy Layout Inspector模糊非常影响使用,猜测是因为新支持的live模式导致的。进入设置搜索"Enable Live Layout Inspector", 然后取消下图选中即可。
其中最重要的是quality setting,根据需求调节,如果需要快速反应的则往左拉,但是清晰度会下降,追求质量的靠右即可,拉到最右,预览渲染其实也不是很慢。
