facebook buck& NDK问题

时间:2016-08-07 15:54:18

标签: android android-ndk buck

我是新手,但我正在尝试运行(因为我想开始使用核素)。

好吧,我尝试运行buck --version它已经给了我这个输出。

BUILD FAILED: Failed to read NDK version from /Users/mlostek/Library/Android/sdk/ndk-bundle

/Users/mlostek/Library/Android/sdk/ndk-bundle/source.properties

的内容
Pkg.Desc = Android NDK
Pkg.Revision = 12.1.2977051

echo $ANDROID_NDK
/Users/mlostek/Library/Android/sdk/ndk-bundle

顺便说一句,我已经通过android studio安装了NDK,而不是通过brew!而且brew doctor说它在那里很好。

UPDATE1

当我运行brew install --HEAD buck时,buck构建的日志文件告诉我以下内容(ant build运行正常)

2016-08-08 12:30:13 +0200

./bin/buck
build
buck

Not using buckd because watchman isn't installed.
[2016-08-08 12:30:20.756][error][command:null][tid:01][com.facebook.buck.cli.Main] Uncaught exception at top level
java.lang.IllegalStateException: /Users/mlostek/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc
    at com.google.common.base.Preconditions.checkState(Preconditions.java:174)
    at com.facebook.buck.android.NdkCxxPlatforms.getToolPath(NdkCxxPlatforms.java:577)
    at com.facebook.buck.android.NdkCxxPlatforms.getCTool(NdkCxxPlatforms.java:626)
    at com.facebook.buck.android.NdkCxxPlatforms.build(NdkCxxPlatforms.java:378)
    at com.facebook.buck.android.NdkCxxPlatforms.getPlatforms(NdkCxxPlatforms.java:137)
    at com.facebook.buck.android.NdkCxxPlatforms.getPlatforms(NdkCxxPlatforms.java:101)
    at com.facebook.buck.rules.KnownBuildRuleTypes.createBuilder(KnownBuildRuleTypes.java:339)
    at com.facebook.buck.rules.KnownBuildRuleTypes.createInstance(KnownBuildRuleTypes.java:233)
    at com.facebook.buck.rules.KnownBuildRuleTypesFactory.create(KnownBuildRuleTypesFactory.java:48)
    at com.facebook.buck.rules.Cell.<init>(Cell.java:115)
    at com.facebook.buck.rules.Cell.createCell(Cell.java:159)
    at com.facebook.buck.cli.Main.runMainWithExitCode(Main.java:829)
    at com.facebook.buck.cli.Main.runMainThenExit(Main.java:610)
    at com.facebook.buck.cli.Main.main(Main.java:1679)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.facebook.buck.cli.bootstrapper.ClassLoaderBootstrapper.main(ClassLoaderBootstrapper.java:62)


HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 850db4ebf473738ffba8424065d62954d3c95dd1
Last commit: 35 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: c6756fa5bfe3ed5881831398ae98cf6190cdd317
Core tap last commit: 10 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.0.0-p648
GCC-4.2: build 0
Clang: 7.3 build 703
Git: 2.7.4 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_66, 1.6.0_65-b14-468
OS X: 10.11.6-x86_64
Xcode: 7.3.1
CLT: 7.3.1.0.1.1461711523
X11: N/A

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
CFLAGS: -I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include/darwin
CXXFLAGS: -I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include/darwin
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
MACOSX_DEPLOYMENT_TARGET: 10.11
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/Homebrew/os/mac/pkgconfig/10.11
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/bin:/usr/local/Library/Homebrew/shims/super:/usr/local/opt/ant/bin:/usr/bin:/bin:/usr/sbin:/sbin

有关如何推动降压的任何提示

1 个答案:

答案 0 :(得分:2)

这几乎肯定是因为Homebrew中的Buck版本太旧了。您可以通过运行brew rm buck && brew install --HEAD buck来安装Buck的最新开发版本,它应该可以解决问题。

此GitHub问题正在跟踪将Home从Homebrew更新为更新版本:https://github.com/facebook/buck/issues/835