Skip to content

TDLib build for java is broken. Example.java uses outdated InlineKeyboardButton constructor #3585

@mikhailvaliev

Description

@mikhailvaliev

Hey, the Java build is currently broken after commit aca2b36 (Feb 2 2026). That commit added iconCustomEmojiId and style fields to inlineKeyboardButton in td_api.tl, but Example.java wasn't updated
to match the new constructor.

Running cmake --build . --target install in example/java/build fails with:

error: no suitable constructor found for InlineKeyboardButton(String,InlineKeyboardButtonTypeUrl)

3 errors on line 292 of example/java/org/drinkless/tdlib/example/Example.java. Since build_java is a dependency of tdjni, the whole build fails and libtdjni.dylib never gets produced.

Fix is straightforward — line 292 needs to use the new 4-arg constructor:

new TdApi.InlineKeyboardButton("https://telegram.org?1", 0, new TdApi.ButtonStyleDefault(), new TdApi.InlineKeyboardButtonTypeUrl())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions