sccn / lsl_archived

Multi-modal time-synched data transmission over local network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

External native build issues while building LSL Android Studio examples

nikhiljacob123 opened this issue · comments

Hi,

Would appreciate your help here. I have been trying to run the example android studio 'SendStringMarkers' in Android studio and am getting errors related to external native build issues. I have followed the instructions on the github page and downgraded the ndk to revision 14b. Yet the error remains. Could you please advice me on what went wrong? I have attached a screenshot of the error here.

Here is the error:

Build command failed.

Error while executing process C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Work\SleepApp_final\liblsl-Android\AndroidStudio -BC:\Work\SleepApp_final\liblsl-Android\AndroidStudio\ReceiveStringMarkers.externalNativeBuild\cmake\debug\armeabi -DANDROID_ABI=armeabi -DANDROID_PLATFORM=android-17 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Work\SleepApp_final\liblsl-Android\AndroidStudio\ReceiveStringMarkers\build\intermediates\cmake\debug\obj\armeabi -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

You have called ADD_LIBRARY for library lsl without any source files. This typically indicates a problem with your CMakeLists.txt file

-- Configuring done

CMake Error: CMake can not determine linker language for target: lsl

-- Generating done

-- Build files have been written to: C:/Work/SleepApp_final/liblsl-Android/AndroidStudio/ReceiveStringMarkers/.externalNativeBuild/cmake/debug/armeabi

Build command failed.

Error while executing process C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Work\SleepApp_final\liblsl-Android\AndroidStudio -BC:\Work\SleepApp_final\liblsl-Android\AndroidStudio\ReceiveStringMarkers.externalNativeBuild\cmake\release\armeabi -DANDROID_ABI=armeabi -DANDROID_PLATFORM=android-17 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Work\SleepApp_final\liblsl-Android\AndroidStudio\ReceiveStringMarkers\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

You have called ADD_LIBRARY for library lsl without any source files. This typically indicates a problem with your CMakeLists.txt file

-- Configuring done

CMake Error: CMake can not determine linker language for target: lsl

-- Generating done

-- Build files have been written to: C:/Work/SleepApp_final/liblsl-Android/AndroidStudio/ReceiveStringMarkers/.externalNativeBuild/cmake/release/armeabi

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Build command failed.

Error while executing process C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Work\SleepApp_final\liblsl-Android\AndroidStudio -BC:\Work\SleepApp_final\liblsl-Android\AndroidStudio\SendStringMarkers.externalNativeBuild\cmake\release\armeabi -DANDROID_ABI=armeabi -DANDROID_PLATFORM=android-17 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Work\SleepApp_final\liblsl-Android\AndroidStudio\SendStringMarkers\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

You have called ADD_LIBRARY for library lsl without any source files. This typically indicates a problem with your CMakeLists.txt file

-- Configuring done

CMake Error: CMake can not determine linker language for target: lsl

-- Generating done

-- Build files have been written to: C:/Work/SleepApp_final/liblsl-Android/AndroidStudio/SendStringMarkers/.externalNativeBuild/cmake/release/armeabi

Build command failed.

Error while executing process C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Work\SleepApp_final\liblsl-Android\AndroidStudio -BC:\Work\SleepApp_final\liblsl-Android\AndroidStudio\SendStringMarkers.externalNativeBuild\cmake\debug\armeabi -DANDROID_ABI=armeabi -DANDROID_PLATFORM=android-17 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Work\SleepApp_final\liblsl-Android\AndroidStudio\SendStringMarkers\build\intermediates\cmake\debug\obj\armeabi -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

You have called ADD_LIBRARY for library lsl without any source files. This typically indicates a problem with your CMakeLists.txt file

-- Configuring done

CMake Error: CMake can not determine linker language for target: lsl

-- Generating done

-- Build files have been written to: C:/Work/SleepApp_final/liblsl-Android/AndroidStudio/SendStringMarkers/.externalNativeBuild/cmake/debug/armeabi

Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Any help would be much appreciated,
Thanks,
Nikhil

Doing a full recheck of Android is on my to-do list (since the recent repository reorganization), but it may be next week. I will get back to you.

In two weeks Boost 1.69 is out which fixes a build failure with Asio and some versions of the Android NDK, so if you can wait until then it'll be a lot easier.

Nikhil, I've gone through and updated and tested the Android examples. Please update to Android Studio 3.2.1, and get the latest version from master:

git clone --recursive https://github.com/sccn/labstreaminglayer.git

Then rerun your tests and let me know how it goes.