Discussion:
Debugging CMake issues
Anton Gerasimov
2018-04-23 16:03:28 UTC
Permalink
Hi all,

I'm new to Android and am trying to compile a pre-existing library written
a C++ as a native part of an Android application. The library uses CMake
and is divided into small modules, so I decided as a first try to add one
of these modules to the CMakeLists.txt generated by Android Studio (under
"External Build Files" list) with add_subdirectory cmake command.
Unfortunately the error message I've got from Gradle was not really
helpful. When I try to "Sync" the project, I get a single error in
top-level task and the error is just "Extenal native build issues: Error
configuring". Build gives and error in "Run build" -> "Calculate task
graph" -> "Configure project: app" with "Cause: executing external native
build for cmake". Both of these unfortunately give me no insight into what
has failed. Is there a way to get the actual error log from Android Studio?
Maybe the whole idea to use the Studio was wrong and there is a command
line build system for Android (if yes, is the workflow documented
somewhere)?

Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/c71eba74-ee38-4297-be60-9e45e675fc58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alex Cohn
2018-04-24 11:10:01 UTC
Permalink
Look at this stackoverflow
answer: https://stackoverflow.com/a/43442227/192373

BR,
Alex
Post by Anton Gerasimov
Hi all,
I'm new to Android and am trying to compile a pre-existing library written
a C++ as a native part of an Android application. The library uses CMake
and is divided into small modules, so I decided as a first try to add one
of these modules to the CMakeLists.txt generated by Android Studio (under
"External Build Files" list) with add_subdirectory cmake command.
Unfortunately the error message I've got from Gradle was not really
helpful. When I try to "Sync" the project, I get a single error in
top-level task and the error is just "Extenal native build issues: Error
configuring". Build gives and error in "Run build" -> "Calculate task
graph" -> "Configure project: app" with "Cause: executing external native
build for cmake". Both of these unfortunately give me no insight into what
has failed. Is there a way to get the actual error log from Android Studio?
Maybe the whole idea to use the Studio was wrong and there is a command
line build system for Android (if yes, is the workflow documented
somewhere)?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/c50b8727-4083-491e-95e1-745787d138c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Anton Gerasimov
2018-04-24 08:18:31 UTC
Permalink
Sorry, stupid question, have launched gradle build from command line and
got any info I need.
I'm still curious if I could get the build log directly from Android Studio
though.
Post by Anton Gerasimov
Hi all,
I'm new to Android and am trying to compile a pre-existing library written
a C++ as a native part of an Android application. The library uses CMake
and is divided into small modules, so I decided as a first try to add one
of these modules to the CMakeLists.txt generated by Android Studio (under
"External Build Files" list) with add_subdirectory cmake command.
Unfortunately the error message I've got from Gradle was not really
helpful. When I try to "Sync" the project, I get a single error in
top-level task and the error is just "Extenal native build issues: Error
configuring". Build gives and error in "Run build" -> "Calculate task
graph" -> "Configure project: app" with "Cause: executing external native
build for cmake". Both of these unfortunately give me no insight into what
has failed. Is there a way to get the actual error log from Android Studio?
Maybe the whole idea to use the Studio was wrong and there is a command
line build system for Android (if yes, is the workflow documented
somewhere)?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/b81af010-2ca8-46a8-834c-68215ea9c015%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alex Cohn
2018-04-25 07:40:15 UTC
Permalink
Post by Anton Gerasimov
Sorry, stupid question, have launched gradle build from command line and
got any info I need.
I'm still curious if I could get the build log directly from Android
Studio though.
This is exactly what i explain in the linked answer on SO. Is it hard to
understand?
Post by Anton Gerasimov
Post by Anton Gerasimov
Hi all,
I'm new to Android and am trying to compile a pre-existing library
written a C++ as a native part of an Android application. The library uses
CMake and is divided into small modules, so I decided as a first try to add
one of these modules to the CMakeLists.txt generated by Android Studio
(under "External Build Files" list) with add_subdirectory cmake command.
Unfortunately the error message I've got from Gradle was not really
helpful. When I try to "Sync" the project, I get a single error in
top-level task and the error is just "Extenal native build issues: Error
configuring". Build gives and error in "Run build" -> "Calculate task
graph" -> "Configure project: app" with "Cause: executing external native
build for cmake". Both of these unfortunately give me no insight into what
has failed. Is there a way to get the actual error log from Android Studio?
Maybe the whole idea to use the Studio was wrong and there is a command
line build system for Android (if yes, is the workflow documented
somewhere)?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/adf6ba16-4e6d-4c98-8221-99d03f4a5fc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Anton Gerasimov
2018-04-25 07:49:20 UTC
Permalink
Hi Alex,

thank you for your help. My messages have to go through premoderation process, so there is a lag between writing a response an seeing it in the group. I've actually written my previous message before I could see yours.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/18f5ba19-1c5b-4c07-9552-947deea59bc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...