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

    Ben Madore

    07/24/2020, 2:55 PM
    not a kotlin issuee - but does anyon else notice that on mac intellij window switching
    cmd+`
    is constantly broken in new and exciting ways?
    :yes: 3
    w
    m
    3 replies · 3 participants
  • d

    David Glasser

    07/24/2020, 4:43 PM
    I’d like to run a test in IntelliJ with code coverage. Not talking about setting up CI, just manually running a test once and looking at line coverage of one particular function. Is this something that’s supportive? Most of the docs I can find talk about Java specifically, and I’m seeing some links implying this isn’t well supported
    a
    1 reply · 2 participants
  • r

    rkeazor

    07/27/2020, 5:15 PM
    I love now we have IDE support in intelij for making pull request to github. It would be great if this could be extended to other version control sites, like github enterprise or bitbucket
    p
    3 replies · 2 participants
  • w

    wasyl

    07/28/2020, 7:16 AM
    How to prevent IntelliJ from showing generated classes in
    cmd+O
    find classes
    dialog (and in other places, like
    find usages
    )? The search is insanely polluted by all kinds of classes generated by Kapt, but I can’t seem to find a way of only searching in actual, non-generated sources. I feel like in Java it wasn’t an issue, but I might remember wrong
    👀 1
    z
    2 replies · 2 participants
  • b

    bod

    07/30/2020, 3:00 PM
    Hello, World! I quite often unwillingly trigger some kind of Column Selection Mode, when typing some combination of alt and down arrow. But the only shortcut I see for CSM is alt shift 8, so I don't get it. Any idea of what it could be?
    w
    p
    13 replies · 3 participants
  • d

    Davide Giuseppe Farella

    07/31/2020, 2:36 PM
    We can’t clutter git with this ping-pong 😕 😕 😕
    c
    a
    3 replies · 3 participants
  • i

    iFrankWang

    08/03/2020, 10:05 AM
    Hi devs, how do i get
    KtNamedFunction
    's return type in form like "`xxx.xxx.TestClass`"? I've only managed to get the short class name as "`TestClass`" with code like this:
    ktNamedFunction.getTypeReference().getText()
    a
    1 reply · 2 participants
  • n

    natpryce

    08/03/2020, 1:24 PM
    Hi. IntelliJ gives me a warning that the a call to Jackson’s Object Mapper.writeValueAsString is an “Inappropriate blocking method call”. Is that correct? I cannot see it doing any I/O or inter-thread communication that might block the thread.
    d
    6 replies · 2 participants
  • b

    Ben Madore

    08/04/2020, 5:10 PM
    sigh.
    w
    h
    6 replies · 3 participants
  • b

    Ben Madore

    08/04/2020, 5:31 PM
    i figured out how to change the default SDK. i cannot figure out why the editor is constantly reporting issues in every build.gradle.kts even though everything actually builds properly
    h
    11 replies · 2 participants
  • p

    piyush

    08/04/2020, 9:59 PM
    Is there any way to avoid the code completion suggestion with 
    ( <argument> )
      in IntelliJ for kotlin function which accepts function as an argument , I mostly use the outside 
    { }
     and often times clicks the one with 
    ( )
     ?
    fun foo(block:(String, String) -> Unit){
      //Do something
    }
    👍 1
    d
    2 replies · 2 participants
  • a

    andylamax

    08/05/2020, 7:47 PM
    what makes idea navigate to build files instead of subproject sources? this thing is bugging me so much. heeeelp.
    b
    2 replies · 2 participants
  • t

    t3wad

    08/09/2020, 5:21 PM
    I'm running into a Kotlin/Intellij issue where IntelliJ compiles but the the editor shows import error on one particular library. (see screenshots in the thread) Details: I am working with an existing open source project with my son (https://github.com/HyperiumClient/Addon-Workspace) which is is for creating add-on to an Minecraft client 'Hyperium'. I have been teaching him Kolin, and so we are looking to convert the existing java code examples in the project to Kotlin. I updated the build.gradle file to successfully compile kotlin, and I can create a Kotlin main and run it successfully. I run the 'convert to kotlin' successfully, and I can successfully do a build (Note: I have build using IntelliJ internal, not gradle), but as seen in the screenshot in the thread, the converted file import line for cc.hyperium.commands.BaseCommand is in error, and yet the file itself compiles. Does anyone have suggestions on what might be going on and how to fix? I've added more details in the thread.
    a
    5 replies · 2 participants
  • b

    Ben Madore

    08/10/2020, 3:50 PM
    does anyone have a good, open-source, example of configuring a non-trivial multi-module build using gradle kotlin-dsl?
    z
    h
    9 replies · 3 participants
  • a

    atsushi-koshikizawa

    08/12/2020, 7:24 AM
    I want to debug Kotlin-Native codes interactively on IntelliJ IDEA, but it raises exception. How do I fix this?
    2 replies · 1 participant
  • d

    diego-gomez-olvera

    08/13/2020, 10:39 AM
    Hello! I recall in this discussion https://discuss.kotlinlang.org/t/in-future-could-kotlin-have-checked-exception/1579 there was some mentions to have an inspection for checked exceptions, is there such a thing? In general I like the absence of checked exception but there are some cases like IO where it is convenient to be warned.
    a
    1 reply · 2 participants
  • e

    Eugen Martynov

    08/13/2020, 9:44 PM
    Is there setting for kotlin plugin that it will use androidx null aware annotations instead of the JetBrains version?
    a
    4 replies · 2 participants
  • b

    basher

    08/17/2020, 9:39 PM
    Does anyone know what/how Java libraries have to publish, so that IntelliJ properly indexes them? I get red symbols for just one library (builds fine from gradle)
    d
    a
    9 replies · 3 participants
  • g

    Gus

    08/18/2020, 11:51 AM
    Hello. I've just upgraded to Kotlin 1.4 and enabled
    explicitApi()
    (strict mode). I've fixed all the issues reported (e.g., adding
    public
    where necessary).
    gradle build
    works perfectly, and all the tests pass. However, I have a bunch of
    internal
    classes/properties/functions that I'm using in the tests, and IntelliJ reports them as an error and suggests to make them public, which I don't want. Again, I can run the tests just fine. This is a bug in IntelliJ, isn't it?
    a
    10 replies · 2 participants
  • t

    thana

    08/19/2020, 8:42 AM
    hi! Is it a Bug or a feature, that i cannot execute tests anymore by clicking the green triangle in the editor after the kotlin plugin was upgraded to 1.4 because the project's version of kotlinx.serialization is too old? The project itself is stil 1.3.x
    m
    5 replies · 2 participants
  • g

    Gus

    08/20/2020, 12:30 PM
    Anyone else having issues pushing to GitHub since the last update? It seems like IntelliJ forgot my credentials and is now forcing me to use my GitHub username+password instead of letting me use personal access tokens as usual.
    13:29:05.342: [relaynet-powebsockets-jvm] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- src/test/kotlin/tech/relaycorp/poweb/websocket/MockWebSocketListener.kt src/test/kotlin/tech/relaycorp/poweb/PoWebClientTest.kt src/main/kotlin/tech/relaycorp/poweb/PoWebClient.kt
    13:29:05.351: [relaynet-powebsockets-jvm] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F /tmp/git-commit-msg-.txt --
    [parcel-collection d28438b] fixes
     3 files changed, 58 insertions(+), 49 deletions(-)
    13:29:09.661: [relaynet-powebsockets-jvm] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/parcel-collection:parcel-collection
    remote: No anonymous write access.
    fatal: Authentication failed for '<https://github.com/relaycorp/relaynet-powebsockets-jvm.git/>'
    ➕ 1
    m
    5 replies · 2 participants
  • o

    Omar Mainegra

    08/24/2020, 4:27 PM
    Hi, I'm migrating to 1.4 but I got affected by https://youtrack.jetbrains.com/issue/KT-41149, the workaround of disabling the new type inference algorithm works but then Idea and AS get hang constantly. Someone there mentioned they should understand the
    freeCompilerArgs += "-XXLanguage:-NewInference"
    flag when configured in gradle, but it isn't the case for me, and sadly there's no more option to disable this in the IDE (The checkbox was removed in the latest Idea Kotlin plugin)
    a
    m
    6 replies · 3 participants
  • r

    Ryan Pierce

    08/30/2020, 1:29 AM
    I am trying to enable Coroutine Debugging in Android Studio 4.0.1. I am using 
    org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9
     coroutines and the 
    1.4.0-release-Studio4.0-1
     Kotlin plugin. However, I don't see coroutines in my debugger menu as shown below. I've restarted and have 
    Disable coroutine agent
     un-checked. What am I missing?
    g
    v
    3 replies · 3 participants
  • s

    suresh

    08/30/2020, 10:15 AM
    Having lot of issues (mainly on auto completion and speed) with Kotlin Gradle DSL and the latest 1.4.0 release .
    val copyKotlinTemplates  by tasks.registering(Copy::class) {
      this.
    }
    Autocompletion of the above code snippet causing this error.
    java.lang.IllegalStateException: Illegal type substitutor: org.jetbrains.kotlin.resolve.calls.inference.components.NewTypeSubstitutorByConstructorMap@7b541476, because for captured type 'CapturedType(out TypeVariable(C))' supertype approximation should be null, but it is: 'TypeVariable(C)',original supertype: 'TaskContainer'
    	at org.jetbrains.kotlin.resolve.calls.inference.components.NewTypeSubstitutor$DefaultImpls.throwExceptionAboutInvalidCapturedSubstitution(NewTypeSubstitutor.kt:144)
    	at org.jetbrains.kotlin.resolve.calls.inference.components.NewTypeSubstitutor$DefaultImpls.substitute(NewTypeSubstitutor.kt:93)
    ...
    2020-08-30 03:09:40,382 [1252429]  ERROR - on.CompletionProgressIndicator - IntelliJ IDEA 2020.2.1  Build #IU-202.6948.69 
    2020-08-30 03:09:40,382 [1252429]  ERROR - on.CompletionProgressIndicator - JDK: 11.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
    2020-08-30 03:09:40,382 [1252429]  ERROR - on.CompletionProgressIndicator - OS: Mac OS X 
    2020-08-30 03:09:40,382 [1252429]  ERROR - on.CompletionProgressIndicator - Plugin to blame: Kotlin version: 1.4.0-release-IJ2020.2-1 
    2020-08-30 03:09:40,382 [1252429]  ERROR - on.CompletionProgressIndicator - Last Action: CodeCompletion
    Any hint on whats wrong here or is this a kotlin plugin bug?
    a
    1 reply · 2 participants
  • m

    melatonina

    08/30/2020, 1:13 PM
    IDEA is freezing each time I try to debug a JavaFX (tornadofx) application. How can how proceed to pinpoint the problem?
    1 reply · 1 participant
  • k

    Kris Wong

    08/31/2020, 3:56 PM
    I can't seem to figure out how to specify the Java version for gradle tasks run in IDEA. I've tried the choose runtime plugin, the module settings dialog, and setting
    org.gradle.java.home
    in gradle.properties, and none have worked. running my task from the command line works with the latter.
    d
    4 replies · 2 participants
  • j

    jameswald

    08/31/2020, 10:16 PM
    Android Studio 4.0.1 and 4.1 RC 1 both started to freeze on two different macs on different projects. This usually happens when trying to navigate to a symbol declaration, or when deleting a larger block of code. It’s like disk reads become blocked, and the whole OS starts to hang. The only thing in common was that I updated to Kotlin 1.4 in both projects. Anyone else seeing problems like this?
    ➕ 2
    m
    5 replies · 2 participants
  • m

    mp

    09/01/2020, 5:27 PM
    guys - does SpringDataJPA completion\support works with your 2020.2.1 ? p.s. is this appropriate place for this kind of question?!
    a
    2 replies · 2 participants
  • n

    natpryce

    09/03/2020, 10:04 PM
    It’d be really nice if IntelliJ’s extract function refactoring could extract extension functions. If I have an expression like:
    aList.map(f).filter(p).groupBy(f2)
    Extract method will work if I select
    aList.map(f)
    but I’d like to be able to select, say
    .map(f)
    to extract an extension function on the list type.
    ➕ 5
    a
    1 reply · 2 participants
  • t

    thana

    09/04/2020, 9:03 AM
    For some days/weeks now intellij renders errors for usages of
    internal
    fields and methods defined in the same module but a different source set. Is this a bug or a feature? and is there a way to resolve this issue?
    a
    3 replies · 2 participants
Powered by Linen
Title
t

thana

09/04/2020, 9:03 AM
For some days/weeks now intellij renders errors for usages of
internal
fields and methods defined in the same module but a different source set. Is this a bug or a feature? and is there a way to resolve this issue?
a

Alexey Belkov [JB]

09/04/2020, 9:53 AM
Please try to remove .idea directory (back it up first) and reimport the project into IDEA
t

thana

09/04/2020, 10:06 AM
unfortunately that didn't do the trick :(
a

Alexey Belkov [JB]

09/04/2020, 10:08 AM
From my recent experience these tend to be some transient errors, maybe Invalidate caches and restart will help? If it doesn't, can you please share some project to reproduce and hopefully fix the problem?
View count: 1