CMake error “No toolchain for ABI found in the NDK” when trying to build a native Android libtransformNativeLibsWithStripDebugSymbolForRelease execution failed with mips64el-linux-android-stripBuilding a toolchain with cmake to cross-compile for androidError: No toolchains found in the NDK toolchains folder for ABI with prefix: llvmFailed to build C code by using generated NDK toolchainError on build cpp project in android studio in linuxLinker error in Android Studio while compiling NDK project'undefined reference to' the function using Android Studio NDKAndroid Studio NDK Build command failed (Missing c Compiler?)CMake Compiler Check Fails when targeting LLVM build for Android NDKHow to fix “the C++ compiler is not able to compile a simple tst program” with Cmake and Android-NDKAndroid NDK x86 and x86_64 ABI

Intern not wearing safety equipment; how could I have handled this differently?

QR codes, do people use them?

What exactly is a "murder hobo"?

Is conquering your neighbors to fight a greater enemy a valid strategy?

Taking advantage when HR forgets to communicate the rules

Passwordless authentication - how invalidate login code

Is this car delivery via Ebay Motors on Craigslist a scam?

Array or vector? Two dimensional array or matrix?

Chilling juice in copper vessel

What does "frozen" mean (e.g. for catcodes)?

KenKen solver - Python

Wouldn't putting an electronic key inside a small Faraday cage render it completely useless?

What does the multimeter dial do internally?

How to understand flavors and when to use combination of them?

Shipped package arrived - didn't order, possible scam?

Your friend has given you his list of 115 best Doctor Who episodes in order of greatness

What is the meaning of "prairie-dog" in this sentence?

Why do people prefer metropolitan areas, considering monsters and villains?

How should I ask for a "pint" in countries that use metric?

Difference between [[ expr1 || expr2 ]] and [[ expr1 ]] || [[ expr2 ]]

What is this burst transmission sequence across the entire band?

Why did the frequency of the word "черт" (devil) in books increase by a few times since the October Revolution?

What are some bad ways to subvert tropes?

Why do Martians have to wear space helmets?



CMake error “No toolchain for ABI found in the NDK” when trying to build a native Android lib


transformNativeLibsWithStripDebugSymbolForRelease execution failed with mips64el-linux-android-stripBuilding a toolchain with cmake to cross-compile for androidError: No toolchains found in the NDK toolchains folder for ABI with prefix: llvmFailed to build C code by using generated NDK toolchainError on build cpp project in android studio in linuxLinker error in Android Studio while compiling NDK project'undefined reference to' the function using Android Studio NDKAndroid Studio NDK Build command failed (Missing c Compiler?)CMake Compiler Check Fails when targeting LLVM build for Android NDKHow to fix “the C++ compiler is not able to compile a simple tst program” with Cmake and Android-NDKAndroid NDK x86 and x86_64 ABI






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








-1















I'm on a Linux machine and I want to cross compile my C++ source code into a native library for the Android platform and so I invoke CMake with the following command:



cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/home/stav/Android/Sdk/ndk-bundle -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..


This results in the following error:



-- Android: Targeting API '28' with architecture 'x86', ABI 'x86', and processor 'i686'
CMake Error at /usr/share/cmake-3.12/Modules/Platform/Android/Determine-Compiler-NDK.cmake:97 (message):
Android: No toolchain for ABI 'x86' found in the NDK:

/home/stav/Android/Sdk/ndk-bundle

Call Stack (most recent call first):
/usr/share/cmake-3.12/Modules/Platform/Android/Determine- Compiler.cmake:39 (include)
/usr/share/cmake-3.12/Modules/Platform/Android-Determine-C.cmake:1 (include)
/usr/share/cmake-3.12/Modules/CMakeDetermineCCompiler.cmake:27 (include)
CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
See also "/home/stav/cmake_test/build/CMakeFiles/CMakeOutput.log".


(Note: In this example i chose the x86 ABI but i actually get this error no matter which ABI i choose, whether it be x86, x86_64, arm, etc)



However when i look in the directory: $NDK-DIRECTORY/toolschains/ it does contain a sub-directory called 'x86-4-9'.



As well as that there is also another directory called 'x86-clang' under $NDK-DIRECTORY/build/core/toolchains/



So I'm confused about why CMake is telling me it cannot find a toolchain for the x86 ABI when it does seem to be there?



Perhaps I've misunderstood how the Android cross compilation process works.



Unfortunately I've been having a hard time figuring it out as there doesn't seem to be much documentation about it online.










share|improve this question
























  • Also, check if this helps No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    – shizhen
    Mar 27 at 1:48












  • make sure ANDROID_HOME environment variable is set. Most important, make sure you are using right paths NDK docs are updated to reflect it. e.g. cmake as ANDROID_SDK/cmake/3.6.4111459 or similar version, and toolchain as ANDROID_NDK/build/cmake/android.toolchain.cmake

    – Ketan
    Mar 28 at 15:35






  • 1





    It is usually fruitless to work out why someone voted in the way that they did - voting is anonymous here by design. The best thing to do is to ignore it, and if you participate frequently by posting good questions and answers, you will earn far more reputation than you lose. I appreciate downvotes are annoying, but we would rather not have voting advice or commentary in posts here.

    – halfer
    Apr 27 at 14:13


















-1















I'm on a Linux machine and I want to cross compile my C++ source code into a native library for the Android platform and so I invoke CMake with the following command:



cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/home/stav/Android/Sdk/ndk-bundle -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..


This results in the following error:



-- Android: Targeting API '28' with architecture 'x86', ABI 'x86', and processor 'i686'
CMake Error at /usr/share/cmake-3.12/Modules/Platform/Android/Determine-Compiler-NDK.cmake:97 (message):
Android: No toolchain for ABI 'x86' found in the NDK:

/home/stav/Android/Sdk/ndk-bundle

Call Stack (most recent call first):
/usr/share/cmake-3.12/Modules/Platform/Android/Determine- Compiler.cmake:39 (include)
/usr/share/cmake-3.12/Modules/Platform/Android-Determine-C.cmake:1 (include)
/usr/share/cmake-3.12/Modules/CMakeDetermineCCompiler.cmake:27 (include)
CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
See also "/home/stav/cmake_test/build/CMakeFiles/CMakeOutput.log".


(Note: In this example i chose the x86 ABI but i actually get this error no matter which ABI i choose, whether it be x86, x86_64, arm, etc)



However when i look in the directory: $NDK-DIRECTORY/toolschains/ it does contain a sub-directory called 'x86-4-9'.



As well as that there is also another directory called 'x86-clang' under $NDK-DIRECTORY/build/core/toolchains/



So I'm confused about why CMake is telling me it cannot find a toolchain for the x86 ABI when it does seem to be there?



Perhaps I've misunderstood how the Android cross compilation process works.



Unfortunately I've been having a hard time figuring it out as there doesn't seem to be much documentation about it online.










share|improve this question
























  • Also, check if this helps No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    – shizhen
    Mar 27 at 1:48












  • make sure ANDROID_HOME environment variable is set. Most important, make sure you are using right paths NDK docs are updated to reflect it. e.g. cmake as ANDROID_SDK/cmake/3.6.4111459 or similar version, and toolchain as ANDROID_NDK/build/cmake/android.toolchain.cmake

    – Ketan
    Mar 28 at 15:35






  • 1





    It is usually fruitless to work out why someone voted in the way that they did - voting is anonymous here by design. The best thing to do is to ignore it, and if you participate frequently by posting good questions and answers, you will earn far more reputation than you lose. I appreciate downvotes are annoying, but we would rather not have voting advice or commentary in posts here.

    – halfer
    Apr 27 at 14:13














-1












-1








-1








I'm on a Linux machine and I want to cross compile my C++ source code into a native library for the Android platform and so I invoke CMake with the following command:



cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/home/stav/Android/Sdk/ndk-bundle -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..


This results in the following error:



-- Android: Targeting API '28' with architecture 'x86', ABI 'x86', and processor 'i686'
CMake Error at /usr/share/cmake-3.12/Modules/Platform/Android/Determine-Compiler-NDK.cmake:97 (message):
Android: No toolchain for ABI 'x86' found in the NDK:

/home/stav/Android/Sdk/ndk-bundle

Call Stack (most recent call first):
/usr/share/cmake-3.12/Modules/Platform/Android/Determine- Compiler.cmake:39 (include)
/usr/share/cmake-3.12/Modules/Platform/Android-Determine-C.cmake:1 (include)
/usr/share/cmake-3.12/Modules/CMakeDetermineCCompiler.cmake:27 (include)
CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
See also "/home/stav/cmake_test/build/CMakeFiles/CMakeOutput.log".


(Note: In this example i chose the x86 ABI but i actually get this error no matter which ABI i choose, whether it be x86, x86_64, arm, etc)



However when i look in the directory: $NDK-DIRECTORY/toolschains/ it does contain a sub-directory called 'x86-4-9'.



As well as that there is also another directory called 'x86-clang' under $NDK-DIRECTORY/build/core/toolchains/



So I'm confused about why CMake is telling me it cannot find a toolchain for the x86 ABI when it does seem to be there?



Perhaps I've misunderstood how the Android cross compilation process works.



Unfortunately I've been having a hard time figuring it out as there doesn't seem to be much documentation about it online.










share|improve this question
















I'm on a Linux machine and I want to cross compile my C++ source code into a native library for the Android platform and so I invoke CMake with the following command:



cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/home/stav/Android/Sdk/ndk-bundle -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..


This results in the following error:



-- Android: Targeting API '28' with architecture 'x86', ABI 'x86', and processor 'i686'
CMake Error at /usr/share/cmake-3.12/Modules/Platform/Android/Determine-Compiler-NDK.cmake:97 (message):
Android: No toolchain for ABI 'x86' found in the NDK:

/home/stav/Android/Sdk/ndk-bundle

Call Stack (most recent call first):
/usr/share/cmake-3.12/Modules/Platform/Android/Determine- Compiler.cmake:39 (include)
/usr/share/cmake-3.12/Modules/Platform/Android-Determine-C.cmake:1 (include)
/usr/share/cmake-3.12/Modules/CMakeDetermineCCompiler.cmake:27 (include)
CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
See also "/home/stav/cmake_test/build/CMakeFiles/CMakeOutput.log".


(Note: In this example i chose the x86 ABI but i actually get this error no matter which ABI i choose, whether it be x86, x86_64, arm, etc)



However when i look in the directory: $NDK-DIRECTORY/toolschains/ it does contain a sub-directory called 'x86-4-9'.



As well as that there is also another directory called 'x86-clang' under $NDK-DIRECTORY/build/core/toolchains/



So I'm confused about why CMake is telling me it cannot find a toolchain for the x86 ABI when it does seem to be there?



Perhaps I've misunderstood how the Android cross compilation process works.



Unfortunately I've been having a hard time figuring it out as there doesn't seem to be much documentation about it online.







android cmake android-ndk cross-compiling






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 27 at 14:12









halfer

15.1k7 gold badges60 silver badges123 bronze badges




15.1k7 gold badges60 silver badges123 bronze badges










asked Mar 25 at 21:09









stavstav

1111 silver badge15 bronze badges




1111 silver badge15 bronze badges












  • Also, check if this helps No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    – shizhen
    Mar 27 at 1:48












  • make sure ANDROID_HOME environment variable is set. Most important, make sure you are using right paths NDK docs are updated to reflect it. e.g. cmake as ANDROID_SDK/cmake/3.6.4111459 or similar version, and toolchain as ANDROID_NDK/build/cmake/android.toolchain.cmake

    – Ketan
    Mar 28 at 15:35






  • 1





    It is usually fruitless to work out why someone voted in the way that they did - voting is anonymous here by design. The best thing to do is to ignore it, and if you participate frequently by posting good questions and answers, you will earn far more reputation than you lose. I appreciate downvotes are annoying, but we would rather not have voting advice or commentary in posts here.

    – halfer
    Apr 27 at 14:13


















  • Also, check if this helps No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    – shizhen
    Mar 27 at 1:48












  • make sure ANDROID_HOME environment variable is set. Most important, make sure you are using right paths NDK docs are updated to reflect it. e.g. cmake as ANDROID_SDK/cmake/3.6.4111459 or similar version, and toolchain as ANDROID_NDK/build/cmake/android.toolchain.cmake

    – Ketan
    Mar 28 at 15:35






  • 1





    It is usually fruitless to work out why someone voted in the way that they did - voting is anonymous here by design. The best thing to do is to ignore it, and if you participate frequently by posting good questions and answers, you will earn far more reputation than you lose. I appreciate downvotes are annoying, but we would rather not have voting advice or commentary in posts here.

    – halfer
    Apr 27 at 14:13

















Also, check if this helps No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

– shizhen
Mar 27 at 1:48






Also, check if this helps No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

– shizhen
Mar 27 at 1:48














make sure ANDROID_HOME environment variable is set. Most important, make sure you are using right paths NDK docs are updated to reflect it. e.g. cmake as ANDROID_SDK/cmake/3.6.4111459 or similar version, and toolchain as ANDROID_NDK/build/cmake/android.toolchain.cmake

– Ketan
Mar 28 at 15:35





make sure ANDROID_HOME environment variable is set. Most important, make sure you are using right paths NDK docs are updated to reflect it. e.g. cmake as ANDROID_SDK/cmake/3.6.4111459 or similar version, and toolchain as ANDROID_NDK/build/cmake/android.toolchain.cmake

– Ketan
Mar 28 at 15:35




1




1





It is usually fruitless to work out why someone voted in the way that they did - voting is anonymous here by design. The best thing to do is to ignore it, and if you participate frequently by posting good questions and answers, you will earn far more reputation than you lose. I appreciate downvotes are annoying, but we would rather not have voting advice or commentary in posts here.

– halfer
Apr 27 at 14:13






It is usually fruitless to work out why someone voted in the way that they did - voting is anonymous here by design. The best thing to do is to ignore it, and if you participate frequently by posting good questions and answers, you will earn far more reputation than you lose. I appreciate downvotes are annoying, but we would rather not have voting advice or commentary in posts here.

– halfer
Apr 27 at 14:13













3 Answers
3






active

oldest

votes


















1














If you want to build native code outside of Android Studio. You need to pass the tool chain file option to your cmake command:



-DCMAKE_TOOLCHAIN_FILE=<your-path>/android.toolchain.cmake


change <your-path> to your own path for the tool chain file, e.g. ~/Library/Android/sdk/cmake/3.6.3155560/android.toolchain.cmake






share|improve this answer























  • i believe toolchain files are the old way of cross compiling with cmake. According to their 3.7 documentation (cmake.org/cmake/help/v3.7/manual/…) it should automatically be able to find the toolchain file when i set the system name to android.

    – stav
    Jun 16 at 17:32



















0














I have faced the same issue once. What worked for me was updating the old dependencies of the library to newer versions.






share|improve this answer























  • well actually my library doesn't have any dependencies (other than android). This is just a simple project for me to learn how to do it. The project only contain a single main.cpp file with a single function in it and my CMakeLists.txt file just contains add_library(mylib main.cpp) and target_link_libraries(mylib PUBLIC android) thats it.

    – stav
    Mar 25 at 22:33


















-1














I never managed to figure out what exactly the problem was (which is why I didn't select an answer) but I eventually found a workaround. I simply downgraded my NDK to an earlier version (which you can do by deleting your NDK-Bundle folder and then downloading an new one from here) and then everything worked fine.






share|improve this answer

























  • @shizhen has posted an actual fix. You should try that, and select that if it works because pointing at the wrong answer is misleading for anyone else landing here.

    – Dan Albert
    Jun 14 at 20:20













Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55346443%2fcmake-error-no-toolchain-for-abi-found-in-the-ndk-when-trying-to-build-a-nativ%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














If you want to build native code outside of Android Studio. You need to pass the tool chain file option to your cmake command:



-DCMAKE_TOOLCHAIN_FILE=<your-path>/android.toolchain.cmake


change <your-path> to your own path for the tool chain file, e.g. ~/Library/Android/sdk/cmake/3.6.3155560/android.toolchain.cmake






share|improve this answer























  • i believe toolchain files are the old way of cross compiling with cmake. According to their 3.7 documentation (cmake.org/cmake/help/v3.7/manual/…) it should automatically be able to find the toolchain file when i set the system name to android.

    – stav
    Jun 16 at 17:32
















1














If you want to build native code outside of Android Studio. You need to pass the tool chain file option to your cmake command:



-DCMAKE_TOOLCHAIN_FILE=<your-path>/android.toolchain.cmake


change <your-path> to your own path for the tool chain file, e.g. ~/Library/Android/sdk/cmake/3.6.3155560/android.toolchain.cmake






share|improve this answer























  • i believe toolchain files are the old way of cross compiling with cmake. According to their 3.7 documentation (cmake.org/cmake/help/v3.7/manual/…) it should automatically be able to find the toolchain file when i set the system name to android.

    – stav
    Jun 16 at 17:32














1












1








1







If you want to build native code outside of Android Studio. You need to pass the tool chain file option to your cmake command:



-DCMAKE_TOOLCHAIN_FILE=<your-path>/android.toolchain.cmake


change <your-path> to your own path for the tool chain file, e.g. ~/Library/Android/sdk/cmake/3.6.3155560/android.toolchain.cmake






share|improve this answer













If you want to build native code outside of Android Studio. You need to pass the tool chain file option to your cmake command:



-DCMAKE_TOOLCHAIN_FILE=<your-path>/android.toolchain.cmake


change <your-path> to your own path for the tool chain file, e.g. ~/Library/Android/sdk/cmake/3.6.3155560/android.toolchain.cmake







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 1:40









shizhenshizhen

5,2715 gold badges17 silver badges45 bronze badges




5,2715 gold badges17 silver badges45 bronze badges












  • i believe toolchain files are the old way of cross compiling with cmake. According to their 3.7 documentation (cmake.org/cmake/help/v3.7/manual/…) it should automatically be able to find the toolchain file when i set the system name to android.

    – stav
    Jun 16 at 17:32


















  • i believe toolchain files are the old way of cross compiling with cmake. According to their 3.7 documentation (cmake.org/cmake/help/v3.7/manual/…) it should automatically be able to find the toolchain file when i set the system name to android.

    – stav
    Jun 16 at 17:32

















i believe toolchain files are the old way of cross compiling with cmake. According to their 3.7 documentation (cmake.org/cmake/help/v3.7/manual/…) it should automatically be able to find the toolchain file when i set the system name to android.

– stav
Jun 16 at 17:32






i believe toolchain files are the old way of cross compiling with cmake. According to their 3.7 documentation (cmake.org/cmake/help/v3.7/manual/…) it should automatically be able to find the toolchain file when i set the system name to android.

– stav
Jun 16 at 17:32














0














I have faced the same issue once. What worked for me was updating the old dependencies of the library to newer versions.






share|improve this answer























  • well actually my library doesn't have any dependencies (other than android). This is just a simple project for me to learn how to do it. The project only contain a single main.cpp file with a single function in it and my CMakeLists.txt file just contains add_library(mylib main.cpp) and target_link_libraries(mylib PUBLIC android) thats it.

    – stav
    Mar 25 at 22:33















0














I have faced the same issue once. What worked for me was updating the old dependencies of the library to newer versions.






share|improve this answer























  • well actually my library doesn't have any dependencies (other than android). This is just a simple project for me to learn how to do it. The project only contain a single main.cpp file with a single function in it and my CMakeLists.txt file just contains add_library(mylib main.cpp) and target_link_libraries(mylib PUBLIC android) thats it.

    – stav
    Mar 25 at 22:33













0












0








0







I have faced the same issue once. What worked for me was updating the old dependencies of the library to newer versions.






share|improve this answer













I have faced the same issue once. What worked for me was updating the old dependencies of the library to newer versions.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 25 at 22:11









SdghasemiSdghasemi

1,7131 gold badge13 silver badges25 bronze badges




1,7131 gold badge13 silver badges25 bronze badges












  • well actually my library doesn't have any dependencies (other than android). This is just a simple project for me to learn how to do it. The project only contain a single main.cpp file with a single function in it and my CMakeLists.txt file just contains add_library(mylib main.cpp) and target_link_libraries(mylib PUBLIC android) thats it.

    – stav
    Mar 25 at 22:33

















  • well actually my library doesn't have any dependencies (other than android). This is just a simple project for me to learn how to do it. The project only contain a single main.cpp file with a single function in it and my CMakeLists.txt file just contains add_library(mylib main.cpp) and target_link_libraries(mylib PUBLIC android) thats it.

    – stav
    Mar 25 at 22:33
















well actually my library doesn't have any dependencies (other than android). This is just a simple project for me to learn how to do it. The project only contain a single main.cpp file with a single function in it and my CMakeLists.txt file just contains add_library(mylib main.cpp) and target_link_libraries(mylib PUBLIC android) thats it.

– stav
Mar 25 at 22:33





well actually my library doesn't have any dependencies (other than android). This is just a simple project for me to learn how to do it. The project only contain a single main.cpp file with a single function in it and my CMakeLists.txt file just contains add_library(mylib main.cpp) and target_link_libraries(mylib PUBLIC android) thats it.

– stav
Mar 25 at 22:33











-1














I never managed to figure out what exactly the problem was (which is why I didn't select an answer) but I eventually found a workaround. I simply downgraded my NDK to an earlier version (which you can do by deleting your NDK-Bundle folder and then downloading an new one from here) and then everything worked fine.






share|improve this answer

























  • @shizhen has posted an actual fix. You should try that, and select that if it works because pointing at the wrong answer is misleading for anyone else landing here.

    – Dan Albert
    Jun 14 at 20:20















-1














I never managed to figure out what exactly the problem was (which is why I didn't select an answer) but I eventually found a workaround. I simply downgraded my NDK to an earlier version (which you can do by deleting your NDK-Bundle folder and then downloading an new one from here) and then everything worked fine.






share|improve this answer

























  • @shizhen has posted an actual fix. You should try that, and select that if it works because pointing at the wrong answer is misleading for anyone else landing here.

    – Dan Albert
    Jun 14 at 20:20













-1












-1








-1







I never managed to figure out what exactly the problem was (which is why I didn't select an answer) but I eventually found a workaround. I simply downgraded my NDK to an earlier version (which you can do by deleting your NDK-Bundle folder and then downloading an new one from here) and then everything worked fine.






share|improve this answer















I never managed to figure out what exactly the problem was (which is why I didn't select an answer) but I eventually found a workaround. I simply downgraded my NDK to an earlier version (which you can do by deleting your NDK-Bundle folder and then downloading an new one from here) and then everything worked fine.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 27 at 14:11









halfer

15.1k7 gold badges60 silver badges123 bronze badges




15.1k7 gold badges60 silver badges123 bronze badges










answered Apr 20 at 17:29









stavstav

1111 silver badge15 bronze badges




1111 silver badge15 bronze badges












  • @shizhen has posted an actual fix. You should try that, and select that if it works because pointing at the wrong answer is misleading for anyone else landing here.

    – Dan Albert
    Jun 14 at 20:20

















  • @shizhen has posted an actual fix. You should try that, and select that if it works because pointing at the wrong answer is misleading for anyone else landing here.

    – Dan Albert
    Jun 14 at 20:20
















@shizhen has posted an actual fix. You should try that, and select that if it works because pointing at the wrong answer is misleading for anyone else landing here.

– Dan Albert
Jun 14 at 20:20





@shizhen has posted an actual fix. You should try that, and select that if it works because pointing at the wrong answer is misleading for anyone else landing here.

– Dan Albert
Jun 14 at 20:20

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55346443%2fcmake-error-no-toolchain-for-abi-found-in-the-ndk-when-trying-to-build-a-nativ%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해