For me it compiles without casting them to long <@...
# android
p
For me it compiles without casting them to long @memphis
m
That’s weird
p
Maybe your kotlin plugin is outdated?
Cmd-Click on the IntDef class
Copy code
@Retention(SOURCE)
@Target({ANNOTATION_TYPE})
public @interface IntDef {
    /** Defines the allowed constants for this element */
    int[] value() default {};

    /** Defines whether the constants can be used as a flag, or just as an enum (the default) */
    boolean flag() default false;
}
I'm using androidX 1.0.0-rc02, maybe they changed it from int to long
However you might use
TYPE_HEADER = 0L
if it's long for you
m
Copy code
@Retention(SOURCE)
@Target({ANNOTATION_TYPE})
public @interface IntDef {
    /** Defines the allowed constants for this element */
    long[] value() default {};

    /** Defines whether the constants can be used as a flag, or just as an enum (the default) */
    boolean flag() default false;
}
Yeah I’m using
v1.2.51
I used that
TYPE_HEADER = 0L
still get the same error
I have updated Kotlin version to
v1.2.70
now it’s changed to
Int
p
Maybe you had an updated plugin but no updated kotlin version
m
You’re right ! Thanks man 👍