Errors on make apk

I get the following error when I run make apk

./gradlew clean
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details

Configure project :libdeepspeech
arm64-v8a armeabi-v7a x86_64
Task :libdeepspeech:externalNativeBuildCleanDebug FAILED
Clean deepspeech-jni armeabi-v7a,deepspeech-lib armeabi-v7a
ninja: error: loading ‘build.ninja’: No such file or directory

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:libdeepspeech:externalNativeBuildCleanDebug’.

Build command failed.
Error while executing process /home/rtelang/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {–build /home/rtelang/Documents/DeepSpeech-master/native_client/java/libdeepspeech/.externalNativeBuild/cmake/debug/armeabi-v7a --target clean}
ninja: error: loading ‘build.ninja’: No such file or directory

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 7s
3 actionable tasks: 2 executed, 1 up-to-date

What is going wrong?

I don’t know. Did you perform any extra step before ?

We don’t use Ninja, I have no idea why you see this.

And I verified, we don’t reproduce the error either, of course.

I can see build.ninja files, but it’s all handled by CMake. Please ensure you don’t have any stale tree, but there’s not a lot I can help here.

what does this even mean? stale tree?
how to check that? and what kinda changes may I need?

Previous builds ? Unclean directories ?

This is a gradle/cmake level issue that I don’t reproduce. Hard to help.

Maybe try rm -fr native_client/java/libdeepspeech/build native_client/java/app/build ?

I tried it. Not helping.

Well, there is something else getting in the way, but I can’t help more with the current informations. Are you sure there is no previous error that could explain ? What if you share complete logs ?

There is some issue with cmake. the build.ninja file is not getting generated.
Can you help with that?

Have you read my previous answers, that this is not directly our code but Android/gradle/cmake level ?

Have you read my previous message asking for more complete logs ?

I need help with how extract those logs that you want to see.

Also, I need some clarification in steps… to proceed with make apk do I need build the libdeepspeech.so first?

Just copy/paste the whole stdout/stderr from make apk. You can: make apk 2>&1 | tee build.log and then share build.log file.

Have you read native_client/java/README.rst ? It’s explained there.

./gradlew clean
arm64-v8a armeabi-v7a x86_64:clean UP-TO-DATE
:app:clean
:libdeepspeech:externalNativeBuildCleanDebug
Clean deepspeech-jni armeabi-v7a,deepspeech-lib armeabi-v7a
ninja: error: loading ‘build.ninja’: No such file or directory
:libdeepspeech:externalNativeBuildCleanDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:libdeepspeech:externalNativeBuildCleanDebug’.

Build command failed.
Error while executing process /home/rtelang/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {–build /home/rtelang/Documents/DeepSpeech-master/native_client/java/libdeepspeech/.externalNativeBuild/cmake/debug/armeabi-v7a --target clean}
ninja: error: loading ‘build.ninja’: No such file or directory

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s
3 actionable tasks: 2 executed, 1 up-to-date
make: *** [Makefile:13: apk-clean] Error 1

Here are the logs

Have you read native_client/java/README.rst ? It’s explained there

I have and hence I am saying I need more clarification. Can you help with that?
The explanation is quite confusing to me.

What is unclear in the documentation ?

That’s the whole, captured as I suggested?

That’s the whole , captured as I suggested?

Yes it is.

What is unclear in the documentation ?
If I need to build the libdeepspeech.so files before make apk or not.

Ok, you need to be more precise regarding what is unclear, because we explicitely explain that: https://github.com/mozilla/DeepSpeech/blob/master/native_client/java/README.rst#android-java--jni-bindings-libdeepspeech

So either you build all flavors, or you download prebuilt binaries.