How to use jetpack compose with java? <#CJLTWPH7S|...
# compose
s
How to use jetpack compose with java? #compose #compose-android
😂 3
🚫 11
s
Just translate the Java to Kotlin using the Intellij plugin. You might also be able to reference Java classes when targeting the JVM, but I am not sure.
r
@SanjayKarki Jetpack Compose requires Kotlin, in large part because it uses a Kotlin compiler plugin
3
❤️ 2
s
thanks you guys for the information.
m
@SanjayKarki You have not clearly specified what kind of java usage you have in mind. If you are running a Kotlin compose application on a JVM (or Android) then it is no problem to use that in combination with any compatible Java code. If however you are asking whether you can call composable functions directly from Java then the answer is no for the reasons which were mentioned already.
478 Views