Where could I start to look, if preview function i...
# compose
l
Where could I start to look, if preview function is broken. It shows only "Initializing...". I'm using AS Canary 14 with embedded JDK and Kotlin 1.5.0-RC plugin installed. Even an new project is broken so it's not project related. Any ideas?
c
I once read somewhere (maybe Jim Sproch actually) that we shouldn't be using the embedded JDK. Although that might not be the issue here, it's worth calling out I think.
I also have problems with preview constantly. I've just accepted the fact that it's buggy, but I suppose I should submit a bug eventually. Maybe you could too.
👍🏻 1
l
Thanks for your input. When you say you have problems, do you mean performance problems or can't you even inspect any previews in the
Design
pane like I described?
And which JDK would you suggest?
c
JDK 11 I believe is the minimum you need for AGP 7 alpha so that's a min. I use JDK 14 though. idk why, I mostly follow that because I think @jw mentioned he uses it, and he also mentioned he uses https://github.com/AdoptOpenJDK/homebrew-openjdk and he knows his stuff. 😄
c
Please please submit bugs or post things here, especially if you can capture the errors happening in your Preview. You should be able to see the issues in the Issue panel by clicking to icon in the top right corner of the Preview panel. It will be a red exclamation mark when there is an issue.
c
Lots of time (for me) theres no red error, it's just that it just doesn't show or doesn't update.
c
I see - we are constantly improving it so please be on the look out for the red error. It should be much better in Canary 14 with reliability and stability (speed still an issue due to some bottlenecks with Kotlin compliation though)
c
Yeah. I get constant warnings of "This project needs to be compiled..." and I hit the build button and it doesn't go away. The main reason now that I've held out was that my dependencies are running 1 version behind since compose/AS now forces Gradle 7, and that breaks a bunch of things in my build. I will file once I can get onto kotlin 1.5, gradle 7, agp 7 latest, AS canary latest, latest compose.
👍 1
l
Did you guys notice that the page for setting the JDK is gone. It's not under project structure anymore. I can only access this page via error messages
🤔 2
c
You’re right - I don’t see it either. Let me ask the team
It looks like the setting moved to the Gradle Settings in Preferences/Settings
The team now realizes we should put a link in the PSD to this new location since many may look there first
c
Interesting. This was def a super recent change
c
Yes, happened in Arctic Fox. I only found out 🤦‍♂️
👍 1