<p dir="ltr">Try to update your Android SDK from android studio?</p>
<div class="gmail_extra"><br><div class="gmail_quote">2016年10月31日 21:31,"Robert Dailey" <<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>>写道:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Which version of Android Studio? Latest stable is 2.2 IIRC. Are you<br>
talking about dev/beta builds?<br>
<div class="elided-text"><br>
On Sun, Oct 30, 2016 at 9:04 AM, Cong Monkey <<a href="mailto:congzhangzh@gmail.com">congzhangzh@gmail.com</a>> wrote:<br>
> The latest release of android studio work with CMAKE well.<br>
><br>
> you can create a new project with c++ support to test CMAKE support!<br>
><br>
> You can follow <a href="https://code.google.com/p/android/issues/detail?id=212007" rel="noreferrer" target="_blank">https://code.google.com/p/<wbr>android/issues/detail?id=<wbr>212007</a><br>
> to get the details.<br>
><br>
> 2016-10-28 5:48 GMT+08:00 Robert Dailey <<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>>:<br>
>> I'm at a bit of a loss on finding more information. Can anyone at<br>
>> least confirm that this isn't a reliable place to find the answers I'm<br>
>> looking for? Does anyone have real experience with android + gradle +<br>
>> cmake integration and can provide some pointers?<br>
>><br>
>> On Tue, Oct 25, 2016 at 8:48 AM, Robert Dailey <<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>> wrote:<br>
>>> I'm not sure if the CMake mailing lists are the right place to ask<br>
>>> this question but I thought I'd ask just in case someone has gone down<br>
>>> this path or has experience with what Google/Gradle is actually trying<br>
>>> to accomplish with what seems to be a hand-built version of CMake with<br>
>>> custom patches that are not in upstream repositories.<br>
>>><br>
>>> Prior to switching to Android Studio / Gradle, I was using Eclipse /<br>
>>> Ant. The way I did CMake integration was not really integration at<br>
>>> all: I generated Ninja build scripts using CMake and implemented<br>
>>> custom targets to run "ant release" after all the C++ projects were<br>
>>> built. I made sure that CMake copied relevant *.so files to<br>
>>> appropriate directories in the Ant structure so they are packaged with<br>
>>> built APKs. That's how I did my Android development.<br>
>>><br>
>>> Now that I'm integrating CMake into Gradle, first annoyance I noticed<br>
>>> is that I can't use CMake 3.7 (or any external installation of CMake)<br>
>>> with Android Studio. It requires a version of CMake installed through<br>
>>> SDK Manager. This means I can't use the new Android toolchain<br>
>>> functionality built into CMake 3.7 (sad face). But this is something I<br>
>>> can work around...<br>
>>><br>
>>> Next I found out that stuff I'm setting in my CMake scripts, such as<br>
>>> CPP flags like `-std=c++14` and `-fexceptions` was not being applied.<br>
>>> For whatever reason, Gradle is overriding these from the command line<br>
>>> (I'm guessing?). So this requires me to duplicate the toolchain /<br>
>>> compiler flag setup I already do in my CMake scripts now in the Gradle<br>
>>> build scripts. This seems completely unnecessary and a maintenance<br>
>>> burden.<br>
>>><br>
>>> What I was expecting Gradle to do was essentially provide me some<br>
>>> toolchain file so that CMake can find the compiler and linker to use<br>
>>> and then the rest would be determined by CMake itself.<br>
>>><br>
>>> Is there a way I can tell Gradle to not take so much control over<br>
>>> compiler flags? I want my CMake scripts to do this. I can't imagine<br>
>>> they had a good reason to do this. What have others done in this<br>
>>> situation with their own Gradle + CMake integration? Looking for<br>
>>> advice here, since information is sparse, especially since the Android<br>
>>> Studio 2.2 CMake integration is relatively new stuff.<br>
>> --<br>
>><br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
>><br>
>> Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
>><br>
>> CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
>> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
>> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
>><br>
>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br>
</div></blockquote></div><br></div>