https://kotlinlang.org logo
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
  • v

    Victor Cardona

    12/19/2020, 6:03 PM
    I’m using IntelliJ 2020.3 with the 1.4.21 version of the Kotlin Plugin. When I try to create a build.gradle.kts or settings.gradle.kts file in my buildSrc directory by using the new -> Kotlin Script option in the context menu it treats the periods like a package structure. This happens even when I try to escape the periods with a ‘\’. I’m forced to fall back to new -> File which makes sense in a way, but is could be confusing to a new user. Is there a way to tell IntelliJ that I really just want the period in the name, and am not trying to specify a package structure?
    a
    • 2
    • 1
  • n

    natpryce

    12/21/2020, 3:30 PM
    A recent update broke the Inline Function refactoring in mixed Java/Kotlin codebases. It used to keep the function if it was still called from Java. Now it always deletes the function, which will break Java code.
    a
    • 2
    • 1
  • s

    serebit

    12/21/2020, 9:10 PM
    Tooltips keep disappearing after a fraction of a second when I'm editing Kotlin files (including KTS) and use alt-enter or ctrl-space. Is there a YouTrack issue for this that I can follow?
    ➕ 3
    a
    • 2
    • 1
  • t

    thana

    12/22/2020, 9:39 AM
    Are there others out there who are really annoyed... no realley pissed about how incredibly bad the perforamcne of intellij has gotten? The performance is so awful im thinking about replacing kotlin with java again because it feels like im waiting half of the day for intellij indexing things, finding new files to index again in dexing all depencies... and if there is nothing left to index it "organizes imports" or analyzes stuff... and if you make the mistake to restart the idea all that stuff happens again. Really what to do? my company is paying thousands of dollars to jetbrains and that is the performance? really?
    :also-yes: 2
    :yes-black: 3
    c
    m
    +3
    • 6
    • 18
  • c

    christophsturm

    12/22/2020, 2:48 PM
    i have a project where building with idea fails with
    Kotlin: Cannot access built-in declaration 'kotlin.reflect.KClass'. Ensure that you have a dependency on the Kotlin standard library
    the same file builds fine with gradle. And i have restarted with invalidated caches already multiple times
    • 1
    • 1
  • r

    robstoll

    12/22/2020, 8:09 PM
    seems like 203-1.4.21-release-IJ5981.133 is somewhat broken, I get about 4
    Exception in plugin Kotlin ..
    per hour since the update. Am I the only one? And is it still worth reporting those to JetBrains? And could you please include a button report all, it is quite a useless time waste to click through the list if you want to report all in any case
    m
    c
    a
    • 4
    • 7
  • m

    mbonnin

    12/23/2020, 2:19 PM
    Can I somehow fold the body of the class, not its arguments without having to find the end of the body?
    g
    w
    a
    • 4
    • 5
  • d

    Dmitry

    12/28/2020, 7:38 AM
    I am not sure what I am asking/looking for. But... Is there a way to collect performance metrics (or anything like that) when editing Kotlin code in IntelliJ? I would like to check are there any plugins that I could disable (that I don't need that much) to make IDE more responsive/fast. Or maybe there are settings that I can tune up.
    c
    r
    • 3
    • 2
  • m

    mbonnin

    12/28/2020, 4:53 PM
    I can't seem to get autocomplete working when resolving receiver scopes (
    this@.. <-thisDoesNotAutocomplete
    ). Somehow I'm sure I have seen this working though. Do I miss something or is there a ticket somewhere ?
    w
    • 2
    • 3
  • t

    thana

    12/29/2020, 12:57 PM
    hi, we have an intern library for our project which we
    publishToMavenLocal
    during development. For some reason we cannot attach the sourcecode anymore in intellij, so when we open a file from the library we end up with a decompiled stub instead of the source jar. Also i notice that the stub is generated from a jar file from
    $HOME/.gradle
    instead of
    $HOME/.m2
    while the source jar can be found in the latter only. any idea how to recover from that?
    m
    • 2
    • 1
  • s

    Stumpos

    12/29/2020, 1:43 PM
    Breakpoints in Kotlin seem to be broken. They are not greyed out but they are not hit when the broken runs. I am using Gradle based project with Kotlin plugin version 203-1.4.21-release-IJ5981.133. Any ideas?
    b
    • 2
    • 2
  • h

    holgerbrandl

    01/01/2021, 8:55 PM
    Hi there, is it a known issue or maybe even intended that code coverage is marking empty lines between covered bits as red? I find it confusing at least.
    a
    • 2
    • 1
  • j

    jeggy

    01/05/2021, 4:15 PM
    What would be the best setup for intellij+git to make sure everyone opening one project will be using the same jvm version? I can see collegues using anything from jvm8 to jvm15 and they don't even know why or when they switch between these versions.
    w
    • 2
    • 11
  • b

    bitkid

    01/06/2021, 3:05 PM
    after upgrading the kotlin plugin the gradle support in idea seems broken. anyone seeing these messages?
    java.lang.NoClassDefFoundError: org/jetbrains/plugins/gradle/tooling/ModelBuilderService$Ex
    java.lang.ClassNotFoundException: org.jetbrains.plugins.gradle.tooling.ModelBuilderService$Ex
    Unable to load class 'org.jetbrains.plugins.gradle.tooling.ModelBuilderService$Ex'.
    Possible causes for this unexpected error include:
    Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
    Re-download dependencies and sync project (requires network)
    
    The state of a Gradle build process (daemon) may be corrupt
    d
    • 2
    • 1
  • p

    Paul Woitaschek

    01/07/2021, 8:26 AM
    Is there any way to badge rename things? I have an enum where I want it to rename all entries from SCREAMING_CASE to PascalCase
    m
    w
    • 3
    • 2
  • e

    Emery Tanghanwaye

    01/07/2021, 10:43 PM
    FAILURE: Build failed with an exception. * Where: Initialization script 'C:\Users\Emery\AppData\Local\Temp\ijinit1.gradle' line: 41 * What went wrong: A problem occurred evaluating initialization script.
    org.jetbrains.plugins.gradle.tooling.ModelBuilderService$Ex
    p
    t
    a
    • 4
    • 5
  • t

    tim

    01/11/2021, 2:04 PM
    I'm getting errors in my build.gradle.kts file with intellij 2020.3 and i'm not sure how to fix it. Everything runs correctly via the cli and via the intellij launch/debug buttons. I can even CTRL click on blocks that are red (such as application) and it correctly takes me to the implementation. I have a separate project running at the same time without this issue. Any thoughts?
    j
    • 2
    • 9
  • m

    mbonnin

    01/11/2021, 2:55 PM
    Doing "safe delete" reports unused imports as potentially unsafe to remove. If I remove anyways, it leaves all now dangling imports behind and I have to remove them by hand. I was pretty sure this was something I didn't have to do before. Is there a config option or something I'm missing?
    a
    • 2
    • 1
  • c

    christophsturm

    01/11/2021, 3:50 PM
    when a class in a plugin.xml file does not exist idea offers to create that class and even has it implement the correct interface. but its always creating java classes. Is there a setting to create kotlin classes instead?
    a
    • 2
    • 3
  • b

    Ben Madore

    01/11/2021, 6:53 PM
    i’m working on a precompiled script plugin, and intellij is doing something very strange.
    build.gradle.kts
    dependencies { implementation(“org.jfrog.buildinfo:build-info-extractor-gradle:4.18.3”) } then in my
    my-conventions.gradle.kts
    i have:
    import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
    import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention
    import org.jfrog.gradle.plugin.artifactory.ArtifactoryPluginUtil
    and ij recognizes the last, but does not recognize the 2 before it.
    a
    • 2
    • 6
  • a

    Alex Nordlund

    01/12/2021, 9:25 AM
    Do you need to run intellij locally to generate shared indexes? Or is there some way to do that from CI? We sometimes spend 6-7 minutes just on indexing
    a
    • 2
    • 1
  • h

    holgerbrandl

    01/12/2021, 6:32 PM
    Is there a refactoring to introduce a lambda method parameter from a code selection?
    c
    • 2
    • 13
  • c

    christophsturm

    01/13/2021, 4:45 PM
    idea 2020.3 with the 1.4.21 kotlin plugin is very buggy for me. a lot of time things don’t work and errors are only logged to idea.log instead of the crash reporter. but sometimes just nothing happens at all. I select a move refactoring, click ok, and nothing happens, without a single line written to idea.log
    a
    • 2
    • 5
  • o

    Ola Adolfsson

    01/14/2021, 7:29 PM
    Hi, I would like to reference (preferably clickable) a text file from comment section in a kotlin file. Something like:
    /**
     * [<file://api/src/commonMain/resources/diagram.puml>](Diagram)
     
     */
    Is it possible using a plugin or similiar?
    a
    • 2
    • 3
  • t

    thana

    01/15/2021, 8:32 AM
    since either one of the latest kotlin, or one of the latest intellij updates very often intellij converts normal brakpoints into a "forbidden" icon (attached) as soon as the debugging session starts and just jumps over the breakpoint. How to resolve the situation? (btw stepping through that very code is still possible, if dthe debugger hold and i step into this code)
    ➕ 2
    w
    m
    a
    • 4
    • 13
  • v

    vdlasov

    01/15/2021, 1:18 PM
    Hello! It is possible to debug sequence of operators apply to kotlin collection? listOf(1,2,3,4,4).map{}.filter{}.map{}.toSet()
    c
    • 2
    • 5
  • b

    bod

    01/16/2021, 1:40 PM
    Hello, World! On a Kotlin with gradle project, on IntelliJ community 2020.3.1, when navigating to one of the Kotlin's stdlib function, it shows me the decompiled version. Clicking "Download Sources" executes the following:
    > Task :DownloadSources
    Attempt to download sources from MavenLocal
    Attempt to download sources from BintrayJCenter
    Sources were downloaded to /Users/bod/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.21-2/243af1040cd400e4267d0b6909977d34d9d5770a/kotlin-stdlib-1.4.21-2-sources.jar
    Then if I click on "Choose Sources" and navigate to this location, it still doesn't work... Any ideas on how to fix this annoyance? 🙏
    a
    • 2
    • 2
  • j

    jeff

    01/17/2021, 8:27 PM
    Is there a hotkey (or plugin) to make all my splits sized equally?
    c
    h
    a
    • 4
    • 8
  • b

    Boris Dudelsack

    01/18/2021, 1:36 PM
    Is it still possible to work on Android projects in Intellij IDEA Ultimate? I have a project with multiple sub-projects in it, and one of them is an Android App. Android Studio seems to be fine with it, but in Intellij IDEA i'm getting:
    * Exception is:
    com.intellij.openapi.externalSystem.model.ExternalSystemException: This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.1 or newer.
    m
    m
    g
    • 4
    • 26
  • u

    Uberto Barbini

    01/23/2021, 10:48 AM
    Somehow my project view shows a bookmark (7) near the file name, but I wasn't able to reproduce it with other bookmarks... Is it a new feature? Intellij 2020.3.1 build 29 dec
    d
    • 2
    • 4
Powered by Linen
Title
u

Uberto Barbini

01/23/2021, 10:48 AM
Somehow my project view shows a bookmark (7) near the file name, but I wasn't able to reproduce it with other bookmarks... Is it a new feature? Intellij 2020.3.1 build 29 dec
d

Dmitry Kandalov

01/25/2021, 5:14 PM
Yes, it’s a feature but an old one. You can do something like
ctrl+shift+7
“Toggle bookmark” when focus is in the Project View on the file.
You can also “Toggle bookmark with mnemonic” and choose a letter 😱
u

Uberto Barbini

01/26/2021, 2:40 PM
@Dmitry Kandalov it doesn't work for me, apart for that specific time... if I put ctrl+shift+7 I can see the bookmark in the favorites panel and I can jump to it, but I cannot see in the project view...
d

Dmitry Kandalov

01/26/2021, 6:05 PM
Do you have focus in the project view on the file (instead of the editor)?
View count: 1