https://kotlinlang.org
Join Slack
Hey guys, what the meaning of this error `kotlinx.serialization compiler plugin is not applied to t...
v

Vivek Modi

over 3 years ago
Hey guys, what the meaning of this error
kotlinx.serialization compiler plugin is not applied to the module, so this annotation would not be processed. Make sure that you've setup your buildscript correctly and re-import project.
v
m
+2
  • 4
  • 11
  • 1959
How do I make a composable fill remaining space in a `Column`? Tried `fillMaxHeight` but that takes ...
m

Michael Elgavi

over 4 years ago
How do I make a composable fill remaining space in a
Column
? Tried
fillMaxHeight
but that takes up the entire column
m
a
+2
  • 4
  • 10
  • 1947
Shouldn't clicking outside a textfield clear focus? Curious why this isn't standard behaviour for Ma...
c

Christopher Mederos

over 2 years ago
Shouldn't clicking outside a textfield clear focus? Curious why this isn't standard behaviour for Material components
c
e
+3
  • 5
  • 13
  • 1940
I have a problem with window insets (being always 0). Nothing works, neither `WindowInsets.navigatio...
s

Simon Hardt

over 2 years ago
I have a problem with window insets (being always 0). Nothing works, neither
WindowInsets.navigationBars.getBottom(LocalDensity.current)
nor the
navigationBarsPadding()
-modifier. This occurs when I have composable inside a
ComposeView
which itself is inside an
AndroidView
. Maybe this double injection screws up the insets? This is used as a way to show a
Fragment
inside an
Activity
which only uses
ComponentActivity.setContent()
to get into compose and everything else is handled inside compose only (e.g. navigating to different screens and some of those are simple composables but some are legacy fragments)
s
s
+3
  • 5
  • 6
  • 1928
I am having trouble getting Kotlin language server to work within a fresh ubuntu machine install on ...
r

Ray Rahke

over 1 year ago
I am having trouble getting Kotlin language server to work within a fresh ubuntu machine install on VSCode. 1. I create a new codespace on github (this is just an ubuntu vm) 2. I create a
main.kt
file with a simple hello world print. There is no boilerplate or folder structure, just
project/main.kt
3. I install
Kotlin
extension by fwcd. I receive the output error
... 3 more
Caused by: org.javacs.kt.util.KotlinLSException: No repositories found at $MAVEN_REPOSITORY, $MAVEN_HOME, $M2_HOME or $HOME/.m2
	at org.javacs.kt.classpath.HomeKt.<clinit>(Home.kt:22)
	... 21 more

[Error - 8:01:49 PM] Kotlin Language Client client: couldn't create connection to server.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.ExceptionInInitializerError
This does not happen on my actual machine, where all the intellisense just works after installing the extension. I assume I am missing something I need to download, but can't figure out what. On previous attempts I tried installing kotlinc and openjdk-18, but neither fixed the issue, unless I did not configure them correctly. Can someone please tell me what dependencies are required to get this to work assuming a totally fresh system with no java/kotlin/intellij stuff installed previously?
r
c
j
  • 3
  • 4
  • 1926
Hi all. Using KotlinX, how do I serialize or desarialize a generic attribute? ```@Serializable data ...
r

Rodrigo Silva

over 2 years ago
Hi all. Using KotlinX, how do I serialize or desarialize a generic attribute?
@Serializable
data class Test<T>(
val attr: T
)
r
a
  • 2
  • 10
  • 1899
Hey, I am using `NavigationBarItem` with Material 3 in jetpack compose project. I don’t want to have...
a

Adeel Malik

over 2 years ago
Hey, I am using
NavigationBarItem
with Material 3 in jetpack compose project. I don’t want to have this box-like effect when nav item is selected. What is this called and how do i go about removing it? 🙏
a
s
+3
  • 5
  • 8
  • 1867
Is there any practical way to load SVG files on Compose/iOS at the moment? I can see the `Image`/`Im...
d

darkmoon_uk

about 3 years ago
Is there any practical way to load SVG files on Compose/iOS at the moment? I can see the `Image`/`ImageVector`/`vectorPainter` API set is present - any existing code to get SVG format loaded into that?
d
m
+2
  • 4
  • 10
  • 1867
Is there an Android-provided way to convert a Spanned string into an AnnotatedString? Alternatively,...
b

Ben Powell

over 2 years ago
Is there an Android-provided way to convert a Spanned string into an AnnotatedString? Alternatively, can I read a string resource as an AnnotatedString? I say “Android-provided” because while there are plenty of homegrown converters out there, and even a partial SpanStyle converter in the Compose source code, I’d prefer a complete and maintained solution.
b
e
a
  • 3
  • 3
  • 1858
Hi all - New to gradle. I’m sure I’m doing something silly, but I’m trying to add a jar building cap...
m

Muhammad Talha

over 3 years ago
Hi all - New to gradle. I’m sure I’m doing something silly, but I’m trying to add a jar building capability to my gradle file. But I’m getting an error:
Expression 'jar' cannot be invoked as a function. The function 'invoke()' is not found
. I already added the
java
plugin in the
plugins
function. Would any one be able to provide some guidance? Thanks!
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.6.21"
    java
    application
}

group = "me.talha"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
}

dependencies {
    testImplementation(kotlin("test"))
}

tasks.test {
    useJUnitPlatform()
}

tasks.withType<KotlinCompile>() {
    kotlinOptions.jvmTarget = "11"
}

application {
    mainClass.set("MainKt")
}

jar {
    manifest {
        attributes 'Main-Class': 'MainKt'
    }
}
m
v
e
  • 3
  • 16
  • 1846
Previous111213Next

kotlinlang

A modern programming language that makes developers happier.

Powered by