Errors on make apk

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.

Please ensure to place libdeepspeech.so into the libdeepspeech/libs/{arm64-v8a,armeabi-v7a}/ matching subdirectories.

Where do I get the libdeepspeech.so ?
Do I need to do the bazel build thing?

Have you had a look at the release page ? https://github.com/mozilla/DeepSpeech/releases/tag/v0.6.1

https://github.com/mozilla/DeepSpeech/releases/download/v0.6.1/native_client.arm64.cpu.android.tar.xz
https://github.com/mozilla/DeepSpeech/releases/download/v0.6.1/native_client.armv7.cpu.android.tar.xz

What are you trying to do, in the end ? The Android app is very very limited, it’s just here to serve as a showcase of using the API and running CI tests.

What are you trying to do, in the end ? The Android app is very very limited, it’s just here to serve as a showcase of using the API and running CI tests.

I want to see and use the demo. Check out how is the app built together… and I need to use it in my own android app.

Please keep in mind this is very limited.

Then check the documentation and just use the prebuilt AAR:

This can later be used by other
Gradle-based build with the following configuration:

… code-block::

implementation ‘deepspeech.mozilla.org:libdeepspeech:VERSION@aar’

So just replace implementation project(':libdeepspeech') in native_client/java/app/build.gradle with implementation 'deepspeech.mozilla.org:libdeepspeech:0.6.1@aar' and it should build.

Then check the documentation and just use the prebuilt AAR:

I was looking for that. But I could not find the pre built aar.
I am very to new to android and using linux. Please don’t mind my basic questions.

I just explained to you above what to change to use it.

https://github.com/mozilla/DeepSpeech/releases/download/v0.6.1/native_client.arm64.cpu.android.tar.xz

In which folder do I need to paste these files in?
native_client??

Why don’t you just replace implementation project(:libdeepspeech) as I suggested above ? This will be much easier.