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

    mbonnin

    01/03/2020, 10:19 AM
    Has anyone had any success success running intelliJ on a remote workstation? Something like VNC or maybe just offload the gradle work? I'm currently looking into mpp and build times are not so great on my laptop.
    g
    • 2
    • 5
  • n

    napperley

    01/08/2020, 12:47 AM
    IntelliJ always gets itself tied into a knot when renaming a package in a Kotlin project. Every time a package is renamed IntelliJ creates two folders, and the Project view doesn't display the package(s) properly.
    m
    a
    • 3
    • 5
  • n

    napperley

    01/08/2020, 1:13 AM
    Duplicate KDoc code completion.
    a
    • 2
    • 1
  • b

    bob

    01/08/2020, 7:02 AM
    Got this from filtering a list with multiple filters and I don’t see how it will help performance? Since I need to go through each item the exact same steps (only in a different order) in the two variants. But using a sequence I need to first convert it into a sequence. Why is this a performance boost? The code:
    features
        .filter { it.segment.contains(value) }
        .filter { inDateRange(it.date) }
        .filter { inVersionRange(it.appVersion) }
        .filter { it.osVersion.contains(Build.VERSION.SDK_INT) }
        .map { it.identifier }
    m
    p
    • 3
    • 6
  • b

    Brendan Weinstein

    01/13/2020, 3:14 AM
    Has anyone here managed to setup a backend run configuration that they can debug in a kotlin multiplatform project?
    m
    • 2
    • 2
  • j

    jdemeulenaere

    01/14/2020, 12:32 PM
    Can anyone explain how incremental compilation/analysis at the file level works in IntelliJ ? I.e. how you did to avoid recompiling the entire file when the user makes a small change to that file ?
    g
    e
    • 3
    • 4
  • s

    Sylvain Patenaude

    01/15/2020, 5:19 PM
    message has been deleted
    a
    • 2
    • 3
  • t

    tarek

    01/17/2020, 8:36 AM
    Is there any way to disable the warning “‘kotlin.Result’ cannot be used as return type” ? I added the compiler flag so the code compiles and runs ok, it’s just the IDE warning that’s still there and it’s a bit annoying
    a
    • 2
    • 2
  • r

    Ruckus

    01/17/2020, 6:55 PM
    What is the correct code style setting to change to stop Kotlin inserting new lines after
    ;
    ?
    p
    a
    • 3
    • 3
  • a

    addamsson

    01/18/2020, 10:20 PM
    I'm having trouble running common tests from IDEA. They run fine from the command line but whenever I try to run them from IDEA I get this:
    Execution failed for task ':myProject:jvmTest'.
    > No tests found for given includes: [MyClass](filter.includeTestsMatching)
    This is the button I'm pressing What am I doing wrong?
    r
    s
    • 3
    • 29
  • v

    Vitali Plagov

    01/22/2020, 8:25 AM
    I have declared a mutable list and I want to add an element to this list, but IDEA doesn’t show
    add()
    as an available method. Though, if I ignore it and type in
    list.add(version)
    then it compiles and works as expected. Am I doing smth wrong here? Or it’s rather a bug?
    w
    a
    • 3
    • 3
  • r

    ribesg

    01/23/2020, 2:17 PM
    What do you do when IntelliJ simply refuses to analyze a file? I’m smashing my keyboard but no red appears. Invalidate & Restart does nothing, removing build folder does nothing. Vim has better syntax highlighting right now
    w
    r
    • 3
    • 8
  • g

    GarouDan

    01/27/2020, 2:40 PM
    When I use the
    ⇧⌘A
    (Shift + Command + a; Find Action shortcut) in IntelliJ I have a strange yellow popup error. This is also happening with a colleague of mine here. Is this the same with you? Firstly it was working, then I used the optimise imports from there, and then the error started appearing. Does someone know how to solve this? I’m using IntelliJ IDEA 2019.3.2 Ultimate.
    a
    • 2
    • 2
  • o

    Ola Gawell

    01/28/2020, 12:22 PM
    If I look at the run configuration created the "Gradle project:" points to my root project. But if I change the "Gradle project:" to point to my submodule and run, then everything works
    a
    • 2
    • 4
  • o

    Ola Gawell

    01/28/2020, 12:23 PM
    Is there a way to make IntelliJ generate the correct run configuration?
    s
    a
    a
    • 4
    • 8
  • g

    Gabriel Feo

    02/03/2020, 2:00 PM
    Hi! I’m cross-posting this from #android-studio. I installed the [JetBrains Mono](https://www.jetbrains.com/lp/mono/) font in Android Studio (macOS) and enabled font ligatures, but it seems to be replacing
    ->
    with a unicode character
    →
    , and now even
    vim
    is doing this replacement in the terminal (even Slack is doing it as I type
    -
    followed by
    >
    ! None of my code compiles anymore because of the illegal characters that have been inserted. Does anyone know how IntelliJ could affect the whole system in this way (and how I can fix this)? Android Studio 3.5.3
    m
    c
    +2
    • 5
    • 23
  • y

    Yevhenii Nadtochii

    02/03/2020, 6:02 PM
    Hi! Does anybody know how to change jvm-target for Kotlin Scratch files ? It's a useful thing I enjoy to use ) But It doesn't work when I want to call Java static functions. Project is under Gradle and jvm-target is set to 1.8 in its build.gradle.kts file as well as in Settings --> Build, Execution, Deployment --> Compiler --> Kotlin Compiler. But it doesn't affect sratch files.
    Path.of("path/to/some/file")
    -->
    "Calls to static methods in Java interfaces are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'"
    a
    • 2
    • 1
  • d

    Dylan

    02/04/2020, 9:05 PM
    Hi there! I'm trying to build a simple Hello World (command line) project in Intellij Idea. But when built, the .jar doesn't work, and I don't get why. When I create my project, I choose Kotlin/JVM under Gradle (see Image 1 in thread). The image 2 is the configuration of my artifact, the image 3 is the code of my Hello World, and the image 4 is the output when I try to run the jar from the command line. Do you have any idea?
    c
    m
    • 3
    • 11
  • t

    Timur Atakishiev

    02/05/2020, 4:25 AM
    Why intellijIdea working so slow, when I am writing project in kotlin? When I am using java it is running significantly faster(code complete, alt + enter), is it any plugin that can increase speed of my development?
    r
    c
    a
    • 4
    • 3
  • g

    GarouDan

    02/05/2020, 2:34 PM
    Hi folks, Do you know if we can review PRs from company privates repos from our github? I saw that we have a feature that to check that but I can only see a message like
    Resource protected by SAML enforcement...
    Does someone know how to configure that? It would be better to avoid github review pages which we cannot ignore formatting, for example.
    c
    • 2
    • 2
  • m

    Matthieu Stombellini

    02/05/2020, 10:27 PM
    When using scratch files, this code does not work even though it does not show any issue in the code editor in IntelliJ:
    import Scratch_2.MyEnum.*
    
    enum class MyEnum {
        WORD, NUMBER, WHITESPACE
    }
    
    val myPairs = listOf(
        "example" to WORD,
        "42" to NUMBER,
        " " to WHITESPACE
    )
    
    println(myPairs)
    It does not work because of the import on line 1.
    Unresolved reference: Scratch_2
    (note that I use
    Scratch_n
    where n is whatever IntelliJ suggests in the autocompletion menu) If I replace the first line by
    import MyEnum.*
    directly, then the error is
    Unresolved reference: MyEnum
    The only way of making this code work is by removing the import and specifying
    MyEnum
    every time. Is there any way to make this work?
    e
    • 2
    • 3
  • r

    robstoll

    02/06/2020, 10:58 AM
    not directly kotlin related but maybe knows it nonetheless. How can I see permission changes in the diff view of a file?
    m
    • 2
    • 13
  • i

    Ivan Pavlov

    02/06/2020, 12:51 PM
    Hi guys! I have a strange problem with IDE:
    👀 1
    b
    e
    • 3
    • 4
  • p

    poohbar

    02/07/2020, 9:16 PM
    Copying something to clipboard from a Kotlin file just freezed the IDE completely. I killed it, opened the project again, tried to copy the code to clipboard again, same thing.
    a
    • 2
    • 1
  • s

    Saiz

    02/08/2020, 12:41 PM
    Hello, if i enable kotlin plugin, i can't open a project. i get a exception
    a
    • 2
    • 1
  • p

    pajatopmr

    02/08/2020, 1:06 PM
    Backwards incompatibility: I just dusted off an old repo using Kotlin 1.3.50 and attempted to work on it with IntelliJ 2019.3.2. Imagine my surprise to learn that 2019.3.2 is not about to build my 1.3.50 project. Of course, I am using all sorts of experimental code and pre-releases so I should not be all that surprised. So given that this WILL happen from time to time, what can I do to minimize the pain, short of upgrade to the latest Kotlin version?
    a
    • 2
    • 2
  • s

    Saiz

    02/08/2020, 1:08 PM
    @pajatopmr How i can install older version of this plugin?
    a
    • 2
    • 1
  • n

    napperley

    02/09/2020, 1:36 AM
    In the popup IntelliJ shows options that aren't applicable for the linuxX64 target, eg Java Class.
    a
    • 2
    • 2
  • s

    Samuel Michael

    02/09/2020, 9:43 PM
    any way to set a default local.properties sdk paths for intelli?
    a
    • 2
    • 1
  • c

    Casey Brooks

    02/14/2020, 4:29 PM
    Anyone else find it really annoying that clicking the arrow to collapse a class with a constructor parameters on the next like only collapses the constructor and not the whole class? I have to scroll to the bottom of the class to actually collapse it. It would be nice to have a setting to control that behavior
    d
    a
    • 3
    • 2
Powered by Linen
Title
c

Casey Brooks

02/14/2020, 4:29 PM
Anyone else find it really annoying that clicking the arrow to collapse a class with a constructor parameters on the next like only collapses the constructor and not the whole class? I have to scroll to the bottom of the class to actually collapse it. It would be nice to have a setting to control that behavior
d

dam5s

02/14/2020, 5:06 PM
Ctrl Shift M
on brace will go to the matching brace. Then
Ctrl -
will collapse. Should be more efficient than scrolling and clicking...
a

Alexey Belkov [JB]

02/17/2020, 9:58 AM
Vote https://youtrack.jetbrains.com/issue/KT-22689
View count: 1