【问题标题】:How to find the ndk revision number for your android setup如何为您的 android 设置找到 ndk 修订号
【发布时间】:2016-08-06 00:59:41
【问题描述】:

有没有办法从 cmd 行或从 android studio 中找到理想的 ndk revision number

我的用例是 android studio 已经运行了更新,将ndk-bundle 替换为最新版本,我希望能够找出修订号。那是。即r10dr11a 等。

更新

~/Android/Sdk/ndk-bundle/CHANGELOG.md 看起来像这样 - 我看不到对修订号的明确引用,可以吗?也许只有 11 个,但他们通常也有一封信?

Changelog
=========

Report issues to [GitHub].

[GitHub]: https://github.com/android-ndk/ndk/issues

NDK
---
 * Removed all sysroots for pre-GB platform levels. We dropped support for them
   in r11, but neglected to actually remove them.
 * Exception handling when using `c++_shared` on ARM32 now mostly works (see
   [Known Issues](#known-issues)). The unwinder will now be linked into each
   linked object rather than into libc++ itself.
 * Default compiler flags have been pruned:
   https://github.com/android-ndk/ndk/issues/27.
     * Full changes here: https://android-review.googlesource.com/#/c/207721/5.
 * `-fno-limit-debug-info` has been enabled by default for Clang debug builds.
   This should improve debugability with LLDB.
 * `--build-id` is now enabled by default.
     * This will be shown in native crash reports so you can easily identify
       which version of your code was running.
 * `NDK_USE_CYGPATH` should no longer cause problems with libgcc:
   http://b.android.com/195486.
 * `-Wl,--warn-shared-textrel` and`-Wl,--fatal-warnings` are now enabled by
   default. If you have shared text relocations, your app will not load on
   Marshmallow or later (and have never been allowed for 64-bit apps).
 * Precompiled headers should work better:
   https://github.com/android-ndk/ndk/issues/14 and
   https://github.com/android-ndk/ndk/issues/16.

Clang
-----

 * Clang has been updated to 3.8svn (r256229, build 2690385).
     * Note that Clang packaged in the Windows 64 NDK is actually 32-bit.
 * `__thread` should work for real this time.

GCC
---

 * Synchronized with the ChromeOS GCC @ `google/gcc-4_9` r227810.
 * Backported coverage sanitizer patch from ToT (r231296).
 * Fixed libatomic to not use ifuncs:
   https://github.com/android-ndk/ndk/issues/31.

Binutils
--------

 * "Erratum 843419 found and fixed" info messages are silenced.
 * Introduced option '--long-plt' to fix internal linker error when linking huge
   arm32 binaries.
 * Fixed wrong run time stubs for AArch64. This was causing jump addresses to be
   calculated incorrectly for very large DSOs.
 * Introduced default option '--no-apply-dynamic' to work around a dynamic
   linker bug for earlier Android releases.
 * NDK r11 KI for `dynamic_cast` not working with Clang, x86, `stlport_static`
   and optimization has been fixed.

GDB
---

 * Updated to GDB 7.11: https://www.gnu.org/software/gdb/news/.

Known Issues
------------

 * This is not intended to be a comprehensive list of all outstanding bugs.
 * x86 ASAN still does work. See discussion on
   https://android-review.googlesource.com/#/c/186276/
 * Exception unwinding with `c++_shared` still does not work for ARM on
   Gingerbread or Ice Cream Sandwich.
 * Bionic headers and libraries for Marshmallow and N are not yet exposed
   despite the presence of android-24. Those platforms are still the Lollipop
   headers and libraries (not a regression from r11).
 * RenderScript tools are not present (not a regression from r11):
   https://github.com/android-ndk/ndk/issues/7.
 * r12 will most likely not work with Android Studio/Gradle right away. The
   Gradle plugin will need to be updated to match the build changes we made in
   `ndk-build`.
 * We've regressed on http://b.android.com/41770.

【问题讨论】:

    标签: android android-ndk


    【解决方案1】:

    在 r11 及更高版本的 NDK 的根目录中有一个 source.properties 文件。旧版本有一个RELEASE.TXT

    【讨论】:

    • 不错的发现。这应该有助于选择正确的 c++ 运行时库。
    【解决方案2】:

    我在尝试构建 this version of boost 并使用以下行检索我的 NDK 版本时遇到了同样的问题。

    version=$(sed -En -e 's/^Pkg.Revision\s*=\s*([0-9a-f]+)/r\1/p' $source_properties)
    

    source_properties=$AndroidNDKRoot"/source.properties" 在您的 NDK 文件夹的根目录中。

    【讨论】:

    • 在我的情况下不返回任何内容。所以我使用cat $source_properties | grep Pkg.Revision | sed 's|.*= ||',它返回20.1.5948944
    【解决方案3】:

    在 Android Studio 版本 4.1.1 中,我可以从菜单中找到已安装的 NDK 版本。去 Tools->SDK Manager(或Files->Settings->Appearance & Behavior->System Settings->Android SDK)。然后选择SDK Tools 选项卡,并选中Show Package Details 复选框。您将看到您的 NDK 版本。

    【讨论】:

      猜你喜欢
      • 2013-10-09
      • 1970-01-01
      • 2011-10-12
      • 2016-09-13
      • 1970-01-01
      • 1970-01-01
      • 2014-09-15
      • 1970-01-01
      相关资源
      最近更新 更多