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
  • s

    spand

    04/13/2021, 8:38 AM
    Anyone know if IDEA should be able to pick up default encoding for properties files from the Kotlin gradle project? We have this:
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile.class){
        sourceCompatibility = JavaVersion.VERSION_1_9
        targetCompatibility = JavaVersion.VERSION_1_9
    
        kotlinOptions {
            jvmTarget = "1.9"
            allWarningsAsErrors = warningsAsErrors
        }
    }
    But IDEA still insists on using windows-1252 when editing properties files. (Apparently the default was changed to UTF-8 in Java 9)
    1 reply · 1 participant
  • m

    Marc Knaup

    04/13/2021, 12:39 PM
    Anyone else having frequent brief IDE freezes even with 2021.1? Unfortunately they’re not long enough to trigger an error report. Reformat code: several seconds (esp. annoying when auto-formatting on save) Copy file: several seconds Autocomplete suggestions: up to 2 seconds But the sheer amount of the mini freezes is really annoying.
    a
    c
    +1
    7 replies · 4 participants
  • m

    marzelwidmer

    04/14/2021, 8:00 AM
    😞 hello can maybe somebody give me a tip what is wrong with my setup .. my IDEA crash all the time … https://ea.jetbrains.com/browser/ea_reports
    a
    6 replies · 2 participants
  • s

    spand

    04/14/2021, 9:34 AM
    I have a problem where I launch a
    main
    method via the gutter icon. It correctly creates a Kotlin run configuration but previously it would build (using gradle) and then launch the main method using the command line (visible in first line of the console). Now, it launches as a gradle task (
    11:34:39: Executing task 'MainTestKt.main()'...
    ) ie. with the gradle task execution ui in the Run/Debug panes. Is there a setting for getting the old behavior back ?
    a
    2 replies · 2 participants
  • e

    elect

    04/14/2021, 12:13 PM
    am I the only one where the formatting style rules get reset to the default ones when there is an idea update?
    s
    j
    6 replies · 3 participants
  • w

    wasyl

    04/15/2021, 10:06 AM
    Is there any way to navigate to a type declaration of a generic parameter? Right now
    val foo: Foo = createFoo()
    with caret somewhere in
    createFoo
    , pressing
    cmd + shift + b
    will navigate to
    Foo
    . Nice 👍 What I want is with:
    val foo: Flow<Foo> = createFooFlow()
    with caret somewhere inside
    createFooFlow
    to navigate to the generic parameter,
    Foo
    , instead of
    Flow
    . Is there a shortcut for this, or any other way to easily navigate to
    Foo
    ?
    👀 1
    j
    s
    +1
    6 replies · 4 participants
  • j

    John Towell

    04/16/2021, 2:20 AM
    Are people able to upgrade to 2021.1 using gradle with kotlin DSL. Everyone on my project is not able to get 2021.1 to work
    c
    e
    +1
    4 replies · 4 participants
  • t

    thana

    04/16/2021, 10:55 AM
    We are developming an internal MPP library used in other internal projects. whenever we release a new version of the lib, we have to attach the sources again to view them from depending projects. ist there any way to make intellij automatically choose the right sources? it's really annoying...
    a
    1 reply · 2 participants
  • a

    Ademir Queiroga

    04/16/2021, 1:38 PM
    Hi folks, anyone else receiving
    Could not resolve: org.jetbrains.kotlin:kotlin-stdlib:1.4.32
    after update to
    2021.1
    ? Already tried do invalidate caches and delete the
    .idea
    folder but still having this issue…e
    g
    a
    4 replies · 3 participants
  • e

    edrd

    04/16/2021, 3:45 PM
    Regarding inspections for
    Sequence
    -based expressions not being returned and not having a terminal operation:
    1 reply · 1 participant
  • m

    mbonnin

    04/17/2021, 10:34 PM
    I've noticed sometimes, refactoring takes long seconds/minutes. This seems to happen especially when renaming common identifiers such as "id" or "name". Is there anything I can do to speed that up?
    n
    w
    16 replies · 3 participants
  • c

    Constantine Plotnikov

    04/20/2021, 11:31 AM
    IDEA displays the message: "Kotlin version that is used for building with Maven (1.4.32) differs from the one bundled into the IDE plugin (1.4.32-release-371)". Does IDEA want non-existing version of maven plugin or I'm using wrong maven plugin repository for kotlin maven support?
    a
    1 reply · 2 participants
  • n

    napperley

    04/21/2021, 1:20 AM
    With code completion for a Kotlin source file belonging to a Linux target the Objective C/Swift options appear even though they aren't applicable. Are there any plans to hide the Objective C/Swift code completion stuff for Linux targets? No Apple stuff should be suggested by the Kotlin plugin for Linux targets.
    a
    1 reply · 2 participants
  • c

    Colton Idle

    04/21/2021, 9:57 AM
    Trying to write a simple kotlin unit test using junit 4
    class MyTest {
        @Test
        fun `test something`() {
            Assert.assertEquals("asdf", "asdf")
        }
    }
    When I run that in intellij I get this message. Ideas?
    c
    6 replies · 2 participants
  • c

    Colton Idle

    04/21/2021, 10:10 AM
    Somewhat related. Is there any way for my team to make sure they use the right import? Is there a right import? Can intellij block out the others?
    w
    r
    +3
    25 replies · 6 participants
  • d

    dave08

    04/22/2021, 12:07 PM
    Hi! Is there a bug in the newest stable version of Intellij Ultimate? Every time I try to implement an interface in test code and start typing
    override
    and select a suggestion, it gives me
    override fun dummy() {}
    .... 🤕
    c
    6 replies · 2 participants
  • t

    Tomasz Krakowiak

    04/22/2021, 3:54 PM
    Is it known issue or should I report?
    a
    1 reply · 2 participants
  • c

    christophsturm

    04/22/2021, 4:07 PM
    in the latest plugin version its no longer possible to disable an inspection with alt/enter, the popup looks like this:
    👍 1
    w
    a
    9 replies · 3 participants
  • f

    Fleshgrinder

    04/23/2021, 7:50 PM
    Anyone knows if it's possible to teach IntelliJ to stop weirdly reformatting function:
    callSomeFun("first argument", buildString {
        append("...")
        append("...")
    })
    I think that this is perfectly readable, but it always turns it into something else no matter the setting (well, except the don't do anything). Currently it would turn the above into:
    callSomeFun(
        "first argument",
        buildString {
            append("...")
            append("...")
        },
    )
    😞
    ➕ 1
    e
    4 replies · 2 participants
  • n

    napperley

    04/24/2021, 4:28 AM
    Noticed something weird going on with IntelliJ. The IDE isn't recognising the common module even though I have done a Gradle refresh, and even tried reopening the project.
    o
    a
    6 replies · 3 participants
  • r

    Rob Elliot

    04/24/2021, 4:16 PM
    Anyone else finding IntelliJ locks up if you hit the delete button on a file and then click Delete on the resulting dialogue? macOS 11.2.3, IntelliJ 2021.1.
    a
    2 replies · 2 participants
  • p

    PHondogo

    04/27/2021, 3:40 PM
    How can i find all Kotlin files with package name doesn't matched file path in Intellij project?
    m
    2 replies · 2 participants
  • d

    dave08

    04/28/2021, 1:01 PM
    How do I force Intellij to reperform code analysis on a certain file? It shows me something in red, even though it compiles...
    2 replies · 1 participant
  • r

    Rob Elliot

    04/28/2021, 2:33 PM
    Been a happy IntelliJ user for 12 years, and been paying for a personal Ultimate license for 5 years. But feel like I may be reaching the end of the road. Perhaps it’s time to check out the kotlin / maven / gradle support in VSCode or similar. Or even back to Eclipse ?!
    c
    a
    +1
    9 replies · 4 participants
  • m

    Michael Böiers

    04/30/2021, 5:43 AM
    Ever since I’ve activated the Kotlin code style (as recommended in the Kotlin code conventions), every time IDEA starts (2021.1.1) I get this popping up. Am I the only one? I could select “don’t show again”, but I do want to be reminded when I should update the settings. I suspect there’s a bug when it comes to detecting whether something has changed …
    n
    3 replies · 2 participants
  • n

    nanodeath

    04/30/2021, 4:45 PM
    somewhat random: what the heck is
    JetCodeStyleSettings
    in the IntelliJ code style file? I get that it's Kotlin settings apparently, but why "Jet"
    e
    3 replies · 2 participants
  • t

    thhh

    05/01/2021, 7:17 AM
    What's the keyboard shortcut for "when we hover over the variable that is showing error or warning and the dialog says 'Show Quick Fixes'? Like if we have a variable that shows null related error, we hover over that variable and the dialog says 'Show Quick Fixes. Type mismatch Error. Required ... Found' kinda dialog. Edit: This one

    https://i.imgur.com/E7sjSgu.png▾

    w
    m
    6 replies · 3 participants
  • e

    elect

    05/01/2021, 10:00 PM
    porting code from groovy, copy/pasting this snippet make Idea freezing
    private void throwIllegalArgument(Object object) {
        throw new IllegalArgumentException("Can't handle the following object (${object}) of class (${object.class})")
      }
    am I a the only one?
    a
    2 replies · 2 participants
  • m

    Manuel Pérez Alcolea

    05/01/2021, 10:41 PM
    Why is that I need to
    Invalidate Caches...
    so often? Sometimes IDEA doesn't seem to have access to the SDK libraries or whatever and not even a
    prinln(...)
    is recognized, triggering an error on the IDE (not the compiler/Gradle). What causes this? Can I prevent it? Am I doing something wrong?
    t
    f
    +1
    6 replies · 4 participants
  • n

    napperley

    05/06/2021, 1:03 AM
    After updating the Kotlin plugin to 211-1.5.0-release-759-IJ6693.72 with IntelliJ 2021.1 the syntax highlighting has gone a bit wonky:
    i
    3 replies · 2 participants
Powered by Linen
Title
n

napperley

05/06/2021, 1:03 AM
After updating the Kotlin plugin to 211-1.5.0-release-759-IJ6693.72 with IntelliJ 2021.1 the syntax highlighting has gone a bit wonky:
i

ilya.gorbunov

05/06/2021, 9:02 AM
Is it exactly IDEA 2021.1? I recommend updating IntelliJ to 2021.1.1, because 2021.1 had a bug in indexing that caused a bunch of weird effects when working with Kotlin code. Though, I can't tell at glance if this one of them.
n

napperley

05/06/2021, 9:52 PM
I have the build version if that will remove the ambiguity: IC-211.6693.111
The About dialog does show 2021.1.
View count: 6