https://kotlinlang.org logo
Join SlackCommunities
Powered by
# javadevelopers
  • a

    Ajay

    09/15/2018, 1:01 PM
    Hi All ,I just started my career as backend engineer, what all things should I learn and where can I find best advance java documentation/ course. Also I believe in learning through application and project. where can I search for open source projects to which I can contribute and learn.🙂 Thanks
  • a

    Angad

    09/27/2018, 9:02 PM
    Hey, I just added an awesome day-night mode switch in my Android Library toggle, must have a look : https://github.com/Angads25/android-toggle
  • a

    Angad

    10/13/2018, 10:13 AM
    If someone could help with this: If someone could help with this: https://stackoverflow.com/questions/52791713/roomandroid-foreign-key-constraint-failed-on-deletion
  • r

    Rohan Maity

    01/17/2019, 2:27 AM
    Does anyone know how
    tailrec
    keyword works . I mean how it converts the tail call optimised recursion to iterative one
    d
    e
    • 3
    • 4
  • g

    Gopal S Akshintala

    07/28/2021, 6:08 AM
    Can’t we access Inline Value class fields from Java? In the below example I don’t get any compiler error but fails at runtime with
    error: cannot find symbol
    # Kotlin Value class
    Copy code
    import io.vavr.control.Either
    import io.vavr.kotlin.right
    
    @JvmInline
    value class Name(val s: String) {
        val length: Int
            get() = s.length
    }
    
    fun getAsName(): Either<String, Name> = right(Name("Kotlin"))
    # Java Client
    Copy code
    @Test
    void testValueClass() {
      final var name = getAsName().get();
      Assertions.assertEquals(0, name.getLength());
    }
    # Error
    Copy code
    error: cannot find symbol
        Assertions.assertEquals(0, name.getLength());
                                       ^
      symbol:   method getLength()
      location: variable name of type Name
    Thread in Slack Conversation
  • m

    Mohanraj Sampath

    08/10/2021, 6:33 AM
    If anybody facing this issue ContentResolver Cursor value returns a NULL In Android Stock OS throws SecurityException: Permission Denial: opening provider
  • m

    Mohanraj Sampath

    08/10/2021, 6:35 AM
    I have a problem receiving a media file from the Gallery app or any file manager to my app.
  • g

    Gopal S Akshintala

    08/31/2021, 5:44 AM
    Can someone help me understand what does this exception mean. I am trying to use
    CollectionsKt
    method directly in java and run this in a unit test. However this static import is causing this exception
    Copy code
    import static kotlin.collections.CollectionsKt.chunked;
    However, if I use
    CollectionsKt.chunked(…)
    without the static import, I don’t get this exception:
    Copy code
    java.lang.IllegalAccessError: failed to access class kotlin.collections.CollectionsKt___CollectionsKt from class billing.batch.invoice.services.tax.TaxIntegrator (kotlin.collections.CollectionsKt___CollectionsKt and billing.batch.invoice.services.tax.TaxIntegrator are in unnamed module of loader org.powermock2.core.classloader.javassist.JavassistMockClassLoader @5443d039)
    Slack Conversation
  • k

    Kamila

    03/23/2022, 9:18 AM
    Hi guys, have any of you an experience working on a project (maybe a project consisting of multiple of microservices) with mix of Java and Kotlin? How would this work in a long run? Would that be a great or rather horrible mix of languages in one code base? Would you recommend using Kotlin and Java side by side, rewrite everything to Java or rewrite everything to Kotlin?
  • a

    André Martins

    06/06/2022, 3:53 PM
    Hey has someone ever caught this error?
    Copy code
    java.lang.InternalError: java.io.FileNotFoundException: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/lib/currency.data (No such file or directory)
    I’ve looked at this but couldn’t find much
  • w

    wakingrufus

    07/21/2022, 3:10 PM
    Hi there. is there a way to force kotlin to not use getter convention when accessing a property? I have a transitive depenency that has
    getLogging()
    in 1 version and just a property called
    logging
    in the next, and when i compile against the former, running against the latter fails b/c its looking for a getter method still
    • 1
    • 1
  • s

    Sai krishna Daruvuri

    12/15/2022, 6:43 PM
    Hey , i have a data class and it is complaining about no default constructer for entity , i tried of having jpa plugin but none worked for me
  • c

    Claude Brisson

    02/26/2023, 8:23 AM
    Hi all. I have a legacy Java library, which targets Java 8, and which has methods taking Map arguments. How can I patch this library so that when using it from kotlin, the Map arguments are seen as immutable maps?
  • v

    Václav Benes

    07/19/2024, 1:10 PM
    Hi, Can some one help with foreign api in java 22 ? This code is working in with java 21.
    Copy code
    var POINT_2D: MemoryLayout = MemoryLayout.structLayout(
        JAVA_DOUBLE.withName("x"),
        JAVA_DOUBLE.withName("y")
    )
    
    val handle_x: VarHandle = POINT_2D.varHandle(PathElement.groupElement("x"))
    val handle_y: VarHandle = POINT_2D.varHandle(PathElement.groupElement("y"))
    
    // This doesn't work in java 22
    fun main() {
        Arena.ofConfined().use { arena ->
            val point = arena.allocate(POINT_2D)
            handle_x.set(point, 11)
            handle_y.set(point, 22)
    
            handle_x.get(point).also { println(it) }
            handle_y.get(point).also { println(it) }
    
        }
    }