https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
intellij
  • i

    Ian

    06/25/2021, 2:41 PM
    Is anyone else finding that they have a very large margin within the editor window to the left of where the breakpoint circles appear? It's almost 1/3rd of my editor width and I can't figure out how to get rid of it
    c
    • 2
    • 1
  • b

    Ben Woodworth

    07/01/2021, 2:55 PM
    The compiler is giving me a NOTHING_TO_INLINE warning (which I can
    @Suppress
    just fine), but I'm not seeing the inspection warning in the editor, and I don't see the inspection in the IDE settings to enable it... am I missing something?
    • 1
    • 1
  • v

    Vladimir Dolzhenko

    07/02/2021, 4:04 PM
    I'd like to add Kotlin range inlay hints please vote for the default one (number
    :4
    is in 🧵 )
    ❌ 4
    1️⃣ 3
    4️⃣ 10
    2️⃣ 7
    3️⃣ 2
    j
    e
    +3
    • 6
    • 9
  • a

    addamsson

    07/12/2021, 11:10 AM
    IDEA started to remove
    kotlin.jvm.*
    imports from my files when I format them. This means that all the
    @JvmStatic
    ,
    @JvmOverloads
    , etc annotations now produce a compiler error. What could be the problem? How do I prevent IDEA from doing this?
    ➕ 1
    j
    • 2
    • 6
  • j

    julian

    07/13/2021, 12:50 AM
    When I type
    """Foo"""
    then hit
    Return
    with the cursor between
    o
    and
    "
    , the IDE automatically transforms the code to
    """Foo
        |
    """.trimMargin()
    Is there a way to prevent this from happening?
    e
    • 2
    • 2
  • w

    willyrs

    07/13/2021, 7:48 AM
    I have some "expect" function that I "actualized" in the iosMain folder, and I also have in my gradle:
    sourceSets["iosArm64Main"].dependsOn(sourceSets["iosMain"])
    if I compile everything is ok, but I have an error in the intellij IDE that says that I haven't "actualized" the function in iosArm64Main. How can I get rid of it?
    • 1
    • 2
  • c

    christophsturm

    07/13/2021, 12:36 PM
    does the "introduce parameter object" work for anyone in kotlin? I always get this:
    a
    • 2
    • 6
  • r

    ribesg

    07/20/2021, 11:29 AM
    Is there an easy way to know which version of the Android Gradle plugin is compatible with the current version of IntelliJ IDEA Ultimate you run? I just know that the latest version almost never work but I’m kind of tired to try every version from the last until one works every time I check it
    ☝️ 3
    ➕ 3
    j
    a
    • 3
    • 9
  • r

    rkeazor

    07/22/2021, 12:38 AM
    Is there a time line for when "code with me"will be integrated with Android studio
    a
    • 2
    • 11
  • s

    Slackbot

    07/23/2021, 1:05 PM
    This message was deleted.
    a
    c
    • 3
    • 2
  • s

    Sourabh Rawat

    07/23/2021, 4:46 PM
    Getting following error when trying to add dependency via
    Dependencies
    window in IDEA.
    java.lang.IllegalArgumentException: !packagesearch.packageoperation.error.gradle.missing.configuration!
    a
    • 2
    • 4
  • p

    poohbar

    07/27/2021, 12:05 AM
    Can we please change the IDE code style mechanism to enforce “no trailing comma”? Adding ugly syntax to the language is one thing but not allowing us to easily avoid it is worse.
    e
    a
    c
    • 4
    • 11
  • p

    Peter

    07/28/2021, 2:03 PM
    unable to start IntelliJ after upgrading to 2021.2:
    ❯ open IntelliJ\ <http://IDEA.app|IDEA.app> 
    LSOpenURLsWithRole() failed with error -10810 for the file /Applications/IntelliJ IDEA.app.
    this affects multiple members on our team
    • 1
    • 2
  • i

    Ian

    07/29/2021, 6:18 PM
    IntelliJ has been indexing for hours on a relatively simple Kotlin project - i’ve seen it index the same library multiple times. This is 2021.1 (the latest) on an M1 MacBook Pro. Anyone know what the problem is? This has rendered my IDE virtually useless and is preventing me from working.
    a
    • 2
    • 1
  • r

    Rob Elliot

    07/30/2021, 10:03 AM
    Not kotlin, but ouch… upgraded to 2021.2 Ultimate via the Toolbox. A lot of plugins not working; but oddly they do have 2021.2 versions on the plugins page. Check for updates not updating them. Seems like IntelliJ is failing to spot the available upgrade? e.g., I have the
    .ignore
    , a JetBrains plugin installed at v 4.1.0. It reports
    Incompatible: requires IDE build 211.* or older
    . But the plugin page https://plugins.jetbrains.com/plugin/7495--ignore/versions shows v 4.2.0, Compatibility Range 212—213.* available since Jul 28, 2021.
    • 1
    • 2
  • n

    napperley

    08/01/2021, 3:52 AM
    What I am mentioning would probably sound a bit silly so here it is. In a Kotlin Native code base I have the following code:
    // ...
    internal fun CPointer<FILE>.readLine(): String = memScoped {
        val buffer = alloc<CPointerVar<ByteVar>>()
        val len = alloc<ULongVar>()
        val bytesRead = getline(__lineptr = buffer.ptr, __n = len.ptr, __stream = this@readLine)
        if (bytesRead != -1L) buffer.value?.toKString() ?: "" else ""
    }
    In the code there is a minor issue where a C pointer has been allocated (via the KotlinX C Interop library), but isn't being used by anything (outside of the getline function). It would be nice if the Kotlin IntelliJ plugin could detect some issues with C interop, and show them as warnings (yellow squigglies), or even better provide some quick fixes for the ones that can be easily fixed.
    a
    a
    • 3
    • 2
  • m

    Michael Böiers

    08/03/2021, 12:44 PM
    Hi! I seem to be stuck with the 1.5.10 plugin in Idea 2021.2. Does anyone know what’s up with that?
    ➕ 3
    r
    v
    m
    • 4
    • 7
  • j

    jeggy

    08/04/2021, 12:09 PM
    I just saw that the terminal has gotten a new dropdown menu 😍 This means for Windows users that IntelliJ actually has the best Terminal implementation that any windows program has (including the new Microsoft Terminal) 😆 So I was wondering, is it possible to run the IntelliJ Terminal as a standalone application?
    j
    • 2
    • 1
  • r

    robstoll

    08/05/2021, 3:25 PM
    Are there others which cannot use the File -> New -> Project... menu entry any more with the new intellij version (2021.2)? Nothing happens when clicking on the menu entry 🤷‍♂️
    j
    • 2
    • 6
  • c

    Chilli

    08/08/2021, 10:29 PM
    I'm sorry for asking here, but I have literally no idea where to. The Grazie plugin/IDEA grammar check/LanguageTool doesn't seem to work at all. I have most grammar rules enabled (in fact, more than there are by default) and I do have the grammar inspection turned on as well. The inspection is set to
    typo
    and I can see actual typos as well using that, so that is probably not the problem. The IDEA installation is pretty fresh, I installed it a couple of days ago, I don't recall it working before on this installation (though I'm sure it did on all/most of the previous ones)
    c
    • 2
    • 2
  • c

    Colton Idle

    08/12/2021, 2:36 AM
    No matter how many times I try to implement a shared dictionary so my company stops being flagged as a typo it just doesn't work out for me. Anyone have a tutorial for it? Here's what I did: 1. Go to Preferences > Spelling > Select Project 2. Add typo to dictionary via alt + enter. I see that it generated a file with [coltonidle.xml]. 3. I change the name of the file to "shared_dictionary.xml" 4. Now the typo still shows up. I don't want every user'sname.xml to be checked into source control Anyone figure this out yet?
    e
    c
    • 3
    • 10
  • r

    robstoll

    08/12/2021, 11:33 AM
    Is it a new feature of intellij 2021.2 that it does no longer re-open projects, which were open on close, during startup?
    a
    • 2
    • 1
  • c

    christophsturm

    08/13/2021, 11:01 AM
    in idea can i find all usages of
    this
    in a
    with
    block?
    • 1
    • 1
  • m

    marzelwidmer

    08/16/2021, 4:20 PM
    Funny Question in the latest Intellij Version is there something new about view of code spaces…. or I have some configuration ….. in my Intelij ? the space from the code is bigger … It is nice…. so the code is not too much on the left side… in fullscreen mode …. but I don’t know how this happen… 🙂
    j
    • 2
    • 6
  • v

    v79

    08/16/2021, 7:57 PM
    If I have a Kotlin JVM project IntelliJ, how might I include an npm package containing, say, CSS?
    f
    • 2
    • 1
  • p

    PHondogo

    08/20/2021, 1:33 PM
    (From code using Jetpack Compose library)
    var modifier: Modifier = Modifier
    IntellijIdea treat it as redundant explicit type. But = Modifier is
    companion object : Modifier
    .
    e
    u
    • 3
    • 6
  • p

    Piotr Krzemiński

    08/26/2021, 7:24 AM
    I'm trying to display code coverage in IntelliJ, but getting a failed build once clicking "_Recompile_" in "_Project Is out of Date_" prompt:
    Kotlin: skipping /home/piotr/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-js/1.5.30/3b3f74ca387accb26dd20c274dcb354efdb6c9d9/kotlin-stdlib-js-1.5.30.jar. Incompatible abi version. The current default is '1.4.2', found '1.5.0'. The library produced by 1.5.30-dev-2862 compiler
    Any idea where does the "current default" which is 1.4.2 come from? I'm trying to do it for a JVM Gradle module which depends on a multiplatform module. I ensured that the multiplatform one has the same version of Kotlin and kotlinx libraries, so I don't understand where the 1.4.2 ABI version comes from.
    :youtrack: 1
    a
    • 2
    • 6
  • m

    mcpiroman

    08/26/2021, 9:27 AM
    Opening large kotlin project (the kotlin repo) in intellij 2021.2.1 - looks like code analysis is not run. There is only some basic highlighting of keywords and most actions like 'rename' or 'find usages' don't work. I know it takes some time for IDE to do that, but it's not even trying to - there is no "analyzing..." message in the corner like it was previously and the Idea process is 0% CPU. I left it for few hours and still noting. Is it know issue? Maybe there is some new threshold I need to rise? Smaller project works find though.
    ✅ 1
    a
    • 2
    • 2
  • n

    Nick

    08/26/2021, 5:16 PM
    Is there anyway to arrange code so that the named params are in the same order for all function calls? I think phpstorm can do it?
    ➕ 1
    a
    • 2
    • 1
  • c

    christophsturm

    08/27/2021, 7:55 AM
    since updating to the 1.5.30 plugin i get a lot of classpath problems like
    Cannot access class 'io.ktor.http.ContentType'. Check your module classpath for missing or conflicting dependencies
    😡 1
    a
    • 2
    • 4
Powered by Linen
Title
c

christophsturm

08/27/2021, 7:55 AM
since updating to the 1.5.30 plugin i get a lot of classpath problems like
Cannot access class 'io.ktor.http.ContentType'. Check your module classpath for missing or conflicting dependencies
😡 1
the project builds fine in gradle and the dependencies seem to be correctly defined as far as I can tell. and no exceptions logged.
a

Alexey Belkov [JB]

08/27/2021, 8:44 AM
Does it help to invalidate IDEA caches, remove .idea directory and reimport (or check out the project from scratch)?
c

christophsturm

08/27/2021, 8:45 AM
I tried all that and it only helped for a very short time. now I’m back to the bundled 1.5.10 plugin.
a

Alexey Belkov [JB]

08/27/2021, 12:56 PM
I'm investigating, here is an issue to track: https://youtrack.jetbrains.com/issue/KT-48454
View count: 1