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

    Nicholas Doglio

    05/12/2020, 2:48 PM
    Is there a way to run tests from Run Anything? I usually spend most of my time in distraction free mode and would prefer to not have to exit it to hit the run test gutter icon.
    w
    2 replies · 2 participants
  • c

    christophsturm

    05/12/2020, 3:19 PM
    when i build my project idea displays this warning:
    Warning:Kotlin: ATTENTION!
    This build uses unsafe internal compiler arguments:
    -XXLanguage:+NewInference
    -XXLanguage:+SamConversionForKotlinFunctions
    -XXLanguage:+ReferencesToSyntheticJavaProperties
    This mode is not recommended for production use,
    as no stability/compatibility guarantees are given on
    compiler or generated code. Use it at your own risk!
    I don’t remember editing any kotlin compiler flags and I also don’t see it anywhere
    w
    11 replies · 2 participants
  • g

    Gopal S Akshintala

    05/14/2020, 2:24 PM
    How to configure default gradle wrapper version to be used by Intellij, when creating new gradle project? (Currently it is using 6.1.1 and downloading it, although I have the latest version 6.3 on my machine)
    ➕ 3
    a
    1 reply · 2 participants
  • n

    napperley

    05/15/2020, 2:11 AM
    There is a red squiggly that has appeared in the Gradle pane after doing a Gradle refresh (added a new dependency to the build file). IntelliJ isn't providing a message that explains why the red squiggly has appeared. Below is part of the build file where the dependency has been added:
    linuxArm32Hfp("linuxArm32") {
            compilations.getByName("main") {
                // ...
                dependencies {
                    implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:" +
                        kotlinxSerializationVer)
                }
            }
    // ...
    }
    Under External Libraries there is a entry for org.jetbrains.kotlinx:kotlinx-serialization-runtime-linuxarm32hfp but not for org.jetbrains.kotlinx:kotlinx-serialization-runtime-native.
    a
    5 replies · 2 participants
  • v

    vineethraj49

    05/19/2020, 12:53 AM
    anyone facing issues with 2020.1.1 where upon switching git branches, intellij doesn't seem to figure out on it's own that some files need to be recompiled cases where function parameter types are different or there are data class changes; I seem to have to go to the said file, and manually hit "compile" for it to start working
    p
    m
    4 replies · 3 participants
  • m

    mzgreen

    05/20/2020, 1:03 PM
    Hey! Is it expected that multithreading doesn’t work in scratch files? I just tried to run some Kotlin code that creates threads inside the scratch file and it doesn’t seem to work. It doesn’t crash but I can’t see the output.
    j
    a
    5 replies · 3 participants
  • v

    v79

    05/22/2020, 6:37 AM
    I've just created an empty project in IntelliJ Ultimate 2020.1, using Gradle and Kotlin build script. But IntelliJ isn't recognising my main method - no green arrow. Nor can it find it from "Add Configuration..."
    class Launcher {
    
        fun main(args: Array<String>) {
            println("Hello world")
        }
    }
    m
    d
    8 replies · 3 participants
  • w

    wasyl

    05/22/2020, 10:45 AM
    Is there a refactoring to move a class into another (move
    Bar
    into
    Foo
    such that I have
    Foo.Bar
    )? Simple
    Move
    refactoring doesn’t seem to offer such option
    a
    1 reply · 2 participants
  • k

    kartikpatodi

    06/02/2020, 1:07 PM
    Is there a clipboard history feature in IDEA? Windows has it natively not sure about mac.
    m
    s
    +1
    3 replies · 4 participants
  • a

    Anton Yalyshev [JB]

    06/04/2020, 11:17 AM
    Hi there! Kotlin team recently did research about the quality of refactoring tools for a mixed Java/Kotlin codebase. We found that we need to focus on Change Signature and Inline refactoring, as sometimes they produce corrupted/incorrect code. For the first iteration, we composed a list of issues that we are going to fix KT-39363. If you experience some concrete problem with applying Change Signature or Inline to a mixed codebase, and the problem is not listed there, please let me know about one - we’ll consider including it in this or next iteration.
    👍 4
    d
    1 reply · 2 participants
  • n

    napperley

    06/07/2020, 3:53 AM
    IntelliJ is showing false positives on unused elements even though one can position the carrot on a unused element, press Ctrl+B, and find the location where the unused element is being used.
    🥕 1
    s
    a
    5 replies · 3 participants
  • z

    Zach Klippenstein (he/him) [MOD]

    06/07/2020, 2:17 PM
    Kotlin 1.4-M2 fixes the issue where the coroutines
    Flow.collect
    method from the
    Flow
    interface showed up first in code completion, despite being effectively internal. How does that actually work? Is there some internal hard-coding that special-cases that particular method, or is there a way to use this trick in other code?
    ➕ 1
    a
    l
    5 replies · 3 participants
  • b

    bitkid

    06/10/2020, 10:30 AM
    Any ideas what that error is?
    Error:java: Illegal char <:> at index 124: C:\Users\sadatgus\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\201.7846.76\jbr\bin\Could not resolve com.bitkid:test-commons:0.0.1-SNAPSHOT.
    a
    c
    3 replies · 3 participants
  • c

    christophsturm

    06/15/2020, 12:54 PM
    i have a multiplatform project and idea does not add resources from commonMain to my classpath when running tests. it does work when i run the tests via gradle.
    a
    2 replies · 2 participants
  • p

    PHondogo

    06/17/2020, 10:21 AM
    Hello! I'm developing kotlin multiplatform project. And after every gradle build IDEA is trying to reindex project root dir build folder where js is generated. But it is a build dir and there are no links from my code to code in this folder. Reindexing is taking much time. How can I disable IDEA indexing js generated files in build folder?
    a
    1 reply · 2 participants
  • i

    iex

    06/18/2020, 9:55 AM
    Where in the file system is the Kotlin runtime used by IntelliJ (can't find it in the preferences)? Edit: Probably should download the standalone runtime https://kotlinlang.org/docs/tutorials/command-line.html
    a
    2 replies · 2 participants
  • a

    andylamax

    06/22/2020, 2:11 PM
    Why can't IntelliJ code navigation, navigate to the source instead of the decompiled java byte code when dealing with composite builds? I have a large kotlin multiplatform project. With seven gradle subprojects currently. I have migrated my builds from using buildSrc to composite builds. The project compiles just fine, I even get code completion and intellisense. I only have a problem with code navigation. It seems like intelliJ can't resolve the sources dir of my subprojects. Is this a known issue? Any work around?
    z
    a
    4 replies · 3 participants
  • a

    addamsson

    06/23/2020, 9:34 AM
    I've noticed lately, that sometimes I have to wait at least
    4
    seconds for code completion to pop up. This breaks my flow 😞 Is there a way to speed up code completion somehow? I already have the delay reduced considerably, but it seems that the problem is elsewhere. This is even more pronounced when I'm using string interpolation.
    d
    w
    +4
    18 replies · 7 participants
  • b

    Ben

    06/24/2020, 5:28 PM
    Refactor -> Rename doesn't work for named arguments?
    w
    a
    4 replies · 3 participants
  • r

    rrva

    06/30/2020, 7:08 AM
    The Kotlin plugin feature ML completion for Kotlin sounds interesting. Tell me more, what does it do?
    a
    2 replies · 2 participants
  • p

    poohbar

    07/02/2020, 4:29 PM
    Am I missing something or is there no “specify type explicitly” action in IntelliJ? And why is it missing?
    g
    a
    4 replies · 3 participants
  • b

    bod

    07/05/2020, 1:21 PM
    Hello, World! I've created a class in the
    kotlin
    root folder, and added a
    package
    declaration. I'm used to see a warning for this case, saying that the package doesn't match the directory structure (with an intention to move it). But it doesn't currently do it (no warning) - I'm on a Multiplatorm project, not sure if that's a factor. Ideas?
    w
    r
    4 replies · 3 participants
  • d

    Dico

    07/06/2020, 3:23 PM
    I'm using Handlebars to generate non-html code. Is there a way to make the Handlebars/Mustache plugin recognize that? I.e. disregard html rules or in my case apply C++ syntax rules.
    2 replies · 1 participant
  • r

    Rachel

    07/07/2020, 10:38 AM
    Hi! Please, I've seen that
    1.4-M3-release
    was published in
    Staging
    and
    EAP-NEXT
    channels yesterday: - https://plugins.jetbrains.com/plugin/6954-kotlin/versions/eap-next However, there are two
    1.4-M3-release-x
    versions for the Kotlin compiler in Kotlin DEV Maven repository https://dl.bintray.com/kotlin/kotlin-dev/org/jetbrains/kotlin/kotlin-compiler/:
    1.4-M3-release-207/
      1.4-M3-release-209/
    I think it's the first time a Kotlin plugin for Intellij IDEA is published for
    1.4-M3-x
    while new plugins are published for
    1.4.0-dev
    versions in
    Bootstrap
    channel continuously. Please, I'd be very grateful if someone could confirm if new plugin versions for
    1.4-M3-release
    will be published in
    Staging
    and
    EAP-NEXT
    channels or maybe the next published version will be the release of
    1.4-M3
    . Thank you so much in advance!!
    👍 1
    a
    2 replies · 2 participants
  • r

    rkeazor

    07/08/2020, 4:07 PM
    Hey wondering, how come navigating thru classes with the pop up navigation bar , does not show functions within a class in kotlin like it does in java @hhariri
    h
    p
    +1
    10 replies · 4 participants
  • m

    mbonnin

    07/09/2020, 2:10 PM
    My IntelliJ has troubles recognizing KMP classes used in another JVM module containing Java sources. Everything compiles fine but there are red underlines there and there. Is that a known issue? (reproducing sample there: https://github.com/martinbonnin/testJvmKmp)
    1 reply · 1 participant
  • b

    bod

    07/10/2020, 2:08 PM
    Hello, World! Does anyone know if scope based syntax coloring works in Kotlin?
    m
    4 replies · 2 participants
  • k

    Karlo Lozovina

    07/12/2020, 8:27 PM
    is it possible to debug (step through, inspect objects, etc.) Kotlin Worksheets? Or scratch files?
    🇳🇴 1
    a
    2 replies · 2 participants
  • m

    mbonnin

    07/13/2020, 4:13 PM
    Since this morning, trying to debug unit tests with IDEA 2020.1.3 triggers
    System property 'idea.debugger.dispatch.port' is not set
    . Any idea how I can get that working?
    j
    a
    5 replies · 3 participants
  • j

    Joakim

    07/20/2020, 11:25 AM
    The inspection “Overly long method” for java does not seem available on kotlin, is there a reason why? 🙂
    a
    2 replies · 2 participants
Powered by Linen
Title
j

Joakim

07/20/2020, 11:25 AM
The inspection “Overly long method” for java does not seem available on kotlin, is there a reason why? 🙂
a

Alexey Belkov [JB]

07/21/2020, 9:40 AM
In general, Java inspections don't work with Kotlin code. They have to be rewritten for Kotlin. I created a feature request: https://youtrack.jetbrains.com/issue/KT-40491.
j

Joakim

07/21/2020, 8:41 PM
I understand that there are rewritten, just seemed interesting that it was not there for Kotlin. Only java and groovy. But thank you so much for creating a feature request. 👍 🙂
View count: 1