本篇博客将长期记录在android开发过程中遇到的问题及解决办法,偏于实战,有些问题只提供最有效的解决办法,不涉及原理。
1、android studio 默认的preview 不能显示?
调出preview可以通过 View>Tool Windows>Preview
另外,as两边的按钮原来叫Tool Buttons(如图)。勾上View>Tool Buttons选项就会默认显示了。
2、android studio 集成 greenDao 3 一直提示 “could not find method greendao()...”
按照官方的教程一步步配好了设置,make project或者rebuild的时候一直提示上面的错误。
通过google查询,发现可能有如下解决办法:
a、Try to add the apply plugin: 'org.greenrobot.greendao'
apply statement right after the Android plugin. 不知道这句话什么意思,知道的可以去试试;
b、把引用的插件classpath 'org.greenrobot:greendao-gradle-plugin:3.2.1'
改为3.1.0 。试了试,我的问题解决。原因未知