2017-06-14 58 views
3

我不知道爲什麼,但巴克總是痛苦的設置。我試圖直接從Facebook頁面的macOSGetting started教程。問題是,當我嘗試執行下面的命令,我得到一個錯誤:buck build demo_app_androidBuck - 名稱'project_config'未定義。如何解決它?

錯誤:

[+] PARSING BUCK FILES...0.4s 
BUILD FAILED: Parse error for build file /Users/Antonio/Development/bucksamples/cross-platform-scale-2015-demo/android/BUCK: 
NameError: name 'project_config' is not defined 
Call stack: 
    File "/Users/Antonio/Development/bucksamples/cross-platform-scale-2015-demo/.buckd/resources/v2017.05.31.01/buck_server/buck_parser/buck.py", line 1085, in process_with_diagnostics 
diagnostics=diagnostics) 
    File "/Users/Antonio/Development/bucksamples/cross-platform-scale-2015-demo/.buckd/resources/v2017.05.31.01/buck_server/buck_parser/buck.py", line 972, in process 
os.path.join(self._project_root, path)) 
    File "/Users/Antonio/Development/bucksamples/cross-platform-scale-2015-demo/.buckd/resources/v2017.05.31.01/buck_server/buck_parser/buck.py", line 966, in _process_build_file 
return self._process(build_env, path, is_implicit_include=False) 
    File "/Users/Antonio/Development/bucksamples/cross-platform-scale-2015-demo/.buckd/resources/v2017.05.31.01/buck_server/buck_parser/buck.py", line 926, in _process 
exec(code, module.__dict__) 
    File "/Users/Antonio/Development/bucksamples/cross-platform-scale-2015-demo/android/BUCK", line 16 
project_config(

注:我克隆了fbsamples/bucksamples庫在GitHub上

這是BUCK文件:

# Copyright 2015-present, Facebook, Inc. 
# All rights reserved. 
# 
# This source code is licensed under the license found in the 
# LICENSE file in the root directory of this source tree. 

android_binary(
    name = 'demo-app', 
    manifest = 'AndroidManifest.xml', 
    keystore = '//android/keystores:debug', 
    deps = [ 
    '//android/java/com/facebook/buck/demo:lib', 
    ], 
) 

project_config(
    src_target = ':demo-app', 
) 

爲什麼它失敗如果project_config被定義?

回答

1

project_config在前段時間被刪除。嘗試從BUCK文件中刪除它並再次運行降壓版本。

+0

太棒了,男人!但是,我在運行時遇到了另一個錯誤。我發佈了一個關於它的新問題。同時你可以在這裏找到它(https://github.com/facebook/buck/issues/1176) – Antonio

+0

這是[link](https://stackoverflow.com/q/44555075/2349947)的問題。如果你知道如何解決它,我將不勝感激。 – Antonio

相關問題