Skip to content

Error building Java example - cannot find symbol #3464

@tashoyan

Description

@tashoyan

When running the second cmake --build command from the build sequence (in the directory example/java/build), I get a failure:

cmake --build . --target install
...
[ 60%] Building Java code
/Users/me/tg/td/example/java/org/drinkless/tdlib/example/Example.java:571: error: cannot find symbol
                        chat.themeName = updateChat.themeName;
                            ^
  symbol:   variable themeName
  location: variable chat of type Chat
/Users/me/tg/td/example/java/org/drinkless/tdlib/example/Example.java:571: error: cannot find symbol
                        chat.themeName = updateChat.themeName;
                                                   ^
  symbol:   variable themeName
  location: variable updateChat of type UpdateChatTheme
2 errors
make[2]: *** [CMakeFiles/build_java] Error 1
make[1]: *** [CMakeFiles/build_java.dir/all] Error 2
make: *** [all] Error 2

The build fails, because the class TdApi.Chat does not have such attribute: themeName.
According to the scheme generate/scheme/td_api.tl, the attribute has the following name: theme.
The file Example.java should be updated:

                    synchronized (chat) {
                        chat.theme = updateChat.theme;
                    }

Build environment: MacOS, Intel.

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