【问题标题】:Boost for android error with NDK使用 NDK 提升 android 错误
【发布时间】:2015-12-01 05:53:17
【问题描述】:

我正在尝试在包含 c++ 库的 android 应用程序中添加对 BOOST 的支持。我正在遵循这些说明:

https://github.com/MysticTreeGames/Boost-for-Android

但是,我在运行命令时遇到了错误:

build-android.bat C:/Users/user/.android-sdk/ndk-bundle

错误:

Building boost version: 1.53.0
ERROR: %* is not a valid NDK root

这可能是什么原因造成的?根不正确?我已经为此苦苦挣扎了好几个小时......

【问题讨论】:

  • 请检查“环境变量”中的值。 ;%ANDROID_NDK%;
  • 为什么会有不同?
  • 我没有使用变量,而只是将文件路径作为参数提供
  • 我发现通过为我想要构建的 boost 的所有部分编写 Android.mk 文件来为 android 构建 boost 更容易,然后我使用 call all-makefiles-under 从我的主 Android.mk 调用它。

标签: android c++ boost android-ndk


【解决方案1】:

根据 Ajitha 的评论,ndk-bundle 目录与环境变量中指定的目录不同。例如,我的环境变量将 $ANDROID_NDK_ROOT 指向 C:\NVPACK\android-ndk-r10e,而 ndk-bundle(可以通过 Android Studio > File > Project Structure > SDK Location > 访问,指向 C:\Users\%user\AppData\Local\Android\sdk\ndk-bundle

【讨论】:

  • 你能再解释一下吗?
猜你喜欢
  • 2018-05-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多