kotlin-koans icon indicating copy to clipboard operation
kotlin-koans copied to clipboard

./gradlew test - ArrayIndexOutOfBoundsException: 450

Open andreathacker opened this issue 6 years ago • 1 comments

After cloning the project I tried to run the tests with ./gradlew test but it continues to throw a 'ArrayIndexOutOfBoundsException`

Davids-MBP-2:kotlin-koans david$ ./gradlew test
e: java.lang.ArrayIndexOutOfBoundsException: 450
        at org.jetbrains.org.objectweb.asm.ClassReader.readUnsignedShort(ClassReader.java:2464)
        at org.jetbrains.org.objectweb.asm.ClassReader.readUTF8(ClassReader.java:2525)
        at org.jetbrains.org.objectweb.asm.ClassReader.readModule(ClassReader.java:761)
        at org.jetbrains.org.objectweb.asm.ClassReader.accept(ClassReader.java:646)
        at org.jetbrains.org.objectweb.asm.ClassReader.accept(ClassReader.java:507)

...

Mac 10.13.3 Android Studio 3.1.3 JDK 1.8

andreathacker avatar Jun 23 '18 16:06 andreathacker

In my case, the IDE notified me of the issue. The gradle file shows this warning

image

After setting the version to 1.2.50 compilation succeeds!

buildscript {
    ext.kotlin_version = '1.2.0'

    repositories {
        mavenCentral()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

andreathacker avatar Jun 23 '18 16:06 andreathacker