1

Cmake fails using the GameActivity template.

To recreate the problem:

  1. Use the GameActivity template from Android Developer to create a new project.

How do I get GameActivity working?

I tried:

[CXX1405] exception while building Cmake using [local file path]/CMakeLists.txt: C++ build system [configure] failed when executing: [local file path]/cmake.exe

CXX1405 cmake exception while building android project

CMake will not be able to correctly generate this project after updating Android Studio

I tried navigating the Google Developers website for a solution. There was no step by step solution on Android Developer docs.

tried to adjust build dependencies.

  • 1
    "encountered the same cmake error" - Add the error message into your **question post**. On Stack Overflow a question post is expected to fully contain a problem statement. You may refer to other resources (and questions) for additional data, but main information should be in your question post. – Tsyvarev Dec 17 '22 at 14:58
  • 1
    Please, post **complete** error message, not just the first words of it. E.g. the [question answered by yours](https://stackoverflow.com/q/71803445/3440745) provides much more text. – Tsyvarev Dec 17 '22 at 19:39
  • Please note, that Stack Overflow is NOT a *discussion* forum like Google groups. It is a library of **question posts** and their **answers**. Every question should contain all relevant information about the problem, and the error message is the main part of that information. I agree that when someone asks a question, they could be not aware whether logs are relevant to the problem. But why do not **copy paste** the error message when **initially** ask a question? – Tsyvarev Dec 17 '22 at 21:23
  • 1
    Is the part of the error message `C++ build system [configure] failed when executing` **exact**? Google finds many messages with "while" instead "when", e.g. [here](https://github.com/libcpr/cpr/issues/333#issuecomment-1278563308). If you wonder why it is important to provide the error message exactly, then you could look into that [answer on meta](https://meta.stackoverflow.com/a/359147/3440745). – Tsyvarev Dec 17 '22 at 21:44
  • There is a bug ticket to fix the template (will do it for sure). In the mean time, look at https://developer.android.com/games/agdk/game-activity; and 2 examples (https://github.com/android/ndk-samples/tree/main/hello-vulkan, https://github.com/KhronosGroup/Vulkan-Samples/pull/549). A simple one is here: https://github.com/ggfan/playground/blob/master/android/games/gamesdk/GameActivity/template/). – Gerry Dec 22 '22 at 07:44
  • Please clearly and succinctly provide the exact steps to reproduce the issue. – starball Dec 24 '22 at 08:29

1 Answers1

0

The updated template should work better:

If you are using NativeActivity, switching to GameActivity might reduce ANR in certain scenarios, hence GameActivity is in:

For new applications, starting with GameActivity 2.0.0 might be good.

Gerry
  • 1,223
  • 9
  • 17