I'd love to know if it is possible with Jetpack Co...
# compose-desktop
x
I'd love to know if it is possible with Jetpack Compose for Desktop to be developed in Android Studio and use the
@Preview
annotation for UI preview? I am completly new to Compose and that stuff. Using Kotlin only for Web Backend Engineering
j
I think opening a desktop project in AndroidStudio might more-or-less work, but if you're looking to create a Desktop project, Idea is probably a better bet. It is true that
@Preview
doesn't exist in Idea yet but that is on our todo list.
j
Only change I think is needed when running in Android Studio is that EAP version of kotlin plugin needs to be used. (though I guess that's no different from when running in IntelliJ)
x
@jim Why'd you suggest me to stick with IntelliJ when using Compose for Desktop? What is the advantage there that AS does not have?
j
AS was designed to create Android apps, rather than Desktop apps. AS doesn't make it easy to create new applications that are not Android apps, as that's not its main focus. That said, they're both essentially smart text editors, so either one would work in theory.
☝️ 2
x
I see - well then I'll stick with IntelliJ but hopefully the Preview feature will arrive soon 😄 It's not that convenient to rerun the app for every UI adjustment 💫
e
FWIW I use Android Studio when I work on Desktop and I find it does better than IntelliJ 😄
x
@eygraber @Preview does work for you there?
e
No, but the overall ide experience is better
j
@jim I am using Android Studio 2020.3.1 Canary 02 and I am running desktop and Android apps without problems, but if I try to combine alpha08 with desktop dependencies it burns, Is there any way to use both at same time or the only thing is wait until
@Preview
has desktop support?
j
The goal of AndroidStudio is to support Android development rather than Desktop development, but having said that, if there is a problem that is breaking in AndroidStudio that you think should be supported, please do file a bug against AndroidStudio.
j
Really I don't know if the problem I have is related to Android studio or just to my Gradle config to using the jetbrains plugin together some alpha08 artifacts in androidMain
At same time, I need to use AGP 7.0.0 because it has fixed a bug related with jvm projects which break my buildSrc highlighting and JVM only modules
And I can't use AGP 7 with IntelliJ