Skip to content

NullPointerException in readCmakeFileApiReply:110 #1124

@tomas-mraz

Description

@tomas-mraz

Expected Behavior

The Android native project compiles the Golang application into .apk file.

Current Behavior

Gradle failed to read the reply of CMake's File API.
Running CMake alone is working fine, and Ninja after that is fine too, and results in a built .so library.

The build process started in Android Studio (or Gradle wrapper in terminal), which looks like:

[Android Studio] --> [Gradle] --> [plugin com.android.build.api.dsl.NdkBuild] --> [CMake] --> [Ninja] --> [go build]

All documented in my GitHub repo dedicated only to this issue.

Error message:
C/C++: /home/tomas/aplikace2/app/src/main/cpp/CMakeLists.txt debug|arm64-v8a : There was an error parsing CMake File API result. Please open a bug with zip of /home/tomas/aplikace2/app/.cxx/Debug/3v82m1s2/arm64-v8a

Attached file with output of CMake: data.zip

Context

Trying only the Android ARM 64-bit platform.

  • Gradle 8.14.2 (standalone wrapper)
  • cmake 4.0.2 (from Android SDK)
  • Ninja 1.12.1 (from Android SDK)
  • OpenJDK 17.0.15 (system package)
  • Android SDK - Android 15
  • Android NDK - r26d (older because of go/clang issue )
  • Android Studio - Narwhal 2025.1.1

Steps to Reproduce

git clone https://github.com/tomas-mraz/studio-gradle-cmake-go.git
cd aplikace2
./gradlew build

Your Environment

https://gradle.com/s/qvqm6v4al43c2 Ubuntu24 AMD64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions