Getting started with android tutorial "Cause: executing external native build for cmake"

#1

Hi

Im trying to compile my first audio app on android following this tutorial, And im getting this error “Cause: executing external native build for cmake C:\Users\user\Documents\AndroidApps\Android1\Builds\Android\app\CMakeLists.txt”
Im a noob with android so can anybody help me explaining to me the possible causes of this error?

Thanks

0 Likes

#2

Hi @PabloVc44

Getting started with Android Studio is not easy (even with the JUCE tutorial). I’m sometimes struggling with it myself, but I’m happy to help.

Could you please open the “:hammer: Build” window and then navigate to the “Build” tab (not the “Sync” one). You will see a list of tasks that gradle (the build system used by Android Studio) is executing in order to build your app. Please copy+paste the last few tasks that completed and the one that fails. For reference, when I do Rebuild Project, I get the following output:

> Task :app:clean
> Task :app:checkDebug_DebugClasspath
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebug_DebugBuild
> Task :app:compileDebug_DebugAidl NO-SOURCE
> Task :app:compileDebug_DebugRenderscript
> Task :app:checkDebug_DebugManifest
> Task :app:generateDebug_DebugBuildConfig
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:mainApkListPersistenceDebug_Debug
> Task :app:generateDebug_DebugResValues
> Task :app:generateDebug_DebugResources
> Task :app:mergeDebug_DebugResources
> Task :app:createDebug_DebugCompatibleScreenManifests
> Task :app:processDebug_DebugManifest
> Task :app:splitsDiscoveryTaskDebug_Debug
> Task :app:processDebug_DebugResources
> Task :app:generateDebug_DebugSources
> Task :app:javaPreCompileDebug_Debug
> Task :app:compileDebug_DebugJavaWithJavac
> Task :app:generateJsonModelDebug_Debug UP-TO-DATE

> Task :app:externalNativeBuildDebug_Debug
Build juce_jni x86_64
...
Build juce_jni x86
...
Build juce_jni arm64-v8a
...
Build juce_jni armeabi-v7a
...

> Task :app:compileDebug_DebugSources
> Task :app:mergeDebug_DebugShaders
> Task :app:compileDebug_DebugShaders
> Task :app:generateDebug_DebugAssets
> Task :app:mergeDebug_DebugAssets
> Task :app:transformClassesWithDexBuilderForDebug_Debug
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug_Debug
> Task :app:transformDexArchiveWithDexMergerForDebug_Debug
> Task :app:mergeDebug_DebugJniLibFolders
> Task :app:transformNativeLibsWithMergeJniLibsForDebug_Debug
> Task :app:transformNativeLibsWithStripDebugSymbolForDebug_Debug
> Task :app:checkDebug_DebugLibraries
> Task :app:processDebug_DebugJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForDebug_Debug
> Task :app:validateSigningDebug_Debug
> Task :app:packageDebug_Debug
> Task :app:assembleDebug_Debug

BUILD SUCCESSFUL in 1m 33s
33 actionable tasks: 31 executed, 2 up-to-date
0 Likes

#3

Hi @McMartin

On the build tab i get this

    |build failed|1 s 604 ms|
    |---|---|
    |Run build|1 s 383 ms|
    |Load build|17 ms|
    |Configure build|1 s 353 ms|
    |Load projects|5 ms|
    |rootProject|7 ms|
    |Configure project :|144 ms|
    |Configure project :app	|1 s 230 ms|

when a select Configure "project app" that is the task highlighted on red, i get a pretty long list of org.gradle.api. errors

Apart from this i opened the “> toogle view” pane on the build tab and i detected this error
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
So maybe ill need to install Ninja?

Thanks for the help

0 Likes

#4

Normally no, Ninja should be installed by Android Studio with CMake. On my machine, it is located in: %LocalAppData%\Android\Sdk\cmake\3.10.2.4988404\bin.

0 Likes