Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

作者有遇见会让studio的xml卡顿吗? #32

Open
RXlung opened this issue Jul 17, 2023 · 2 comments
Open

作者有遇见会让studio的xml卡顿吗? #32

RXlung opened this issue Jul 17, 2023 · 2 comments

Comments

@RXlung
Copy link

RXlung commented Jul 17, 2023

起初我以为是项目的问题。
然后创建了一个全新的项目,这时候去写布局,xml会非常快,无感提示。
但是一旦添加进入导图的这个library,主moudle还未依赖,就导致studio的主moudle中写xml布局很卡顿。几秒才提示。
然后我继续测试,在setting.gradle中只要不include这个项目,就很正常。一导入就不行。
重启电脑,重启studio,清理缓存,重传studio。在一个纯净电脑上新装studio都试过了。都会卡顿。
作者大大猜测有可能什么原因导致的?

@RXlung
Copy link
Author

RXlung commented Jul 17, 2023

找到原因,当我没提这个问题,是lib里依赖并且应用了androidx.dynamicanimation:dynamicanimation
和依赖不依赖没关系,只要项目中代码使用了这个框架,就会很卡顿。 在其他项目也测试了下。仅依赖没事,一使用连带所有xml布局写代码都卡了

@guaishouN
Copy link
Owner

应该是因为Android Studio 要渲染xml 预览效果,但是由于自定义树状图中没有设置对,导致Android Studio渲染预览图卡顿。谢谢 提出,现在确实还没处理这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants