android - 降压 - 名称 'project_config' 未定义。如何解决?

标签 android facebook buck

我不知道为什么,但是 Buck 总是很难设置。我试图做 Getting started macOSAndroid 的 Facebook 页面直接提供教程。问题是当我尝试执行以下命令时出现错误:buck build demo_app_android

错误:

[+] 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(

注意:我在 GitHub 上克隆了 fbsamples/bucksamples 存储库

这是 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 为什么会失败?

最佳答案

project_config 不久前被删除。尝试从 BUCK 文件中删除它并再次运行 buck build。

关于android - 降压 - 名称 'project_config' 未定义。如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44552381/

相关文章:

android - Google Play 服务 - SafeParcelable 在哪里?

java - Buck exopackage支持多dex吗?

java - 如何实现XMPP发送推送通知

android - 使用 longclick 在 textview 中显示选择指针并突出显示文本

javascript - 使用Facebook Open Graph API创建对象

ios - 在React Native初始化项目中为iOS设置Facebook SDK时使用未声明的标识符

c++ - 有一个等同于BUCK的header_namespace的cmake吗?

android - 为什么默认情况下我的SearchView会展开

android - 使用android在字符串中添加双引号

java - 在android中从facebook下载图像