3

我正在设置 Buck 以加快 Android 应用程序的构建。该应用通过 appcompat-v7:21.0.+ 库使用 Material Theme,但 Buck 找不到所需的资源。有什么提示吗?

这是错误输出:

$ buck build //app/src/main:main                                             
Using buckd.
[-] PROCESSING BUCK FILES...FINISHED 0.4s
[+] BUILDING...2.0s (3/6 JOBS)
 |=> IDLE
 |=> IDLE
 |=> IDLE
 |=> //app/src/main:main#aapt_package...  1.5s (running aapt_package[1.5s])
Log:
No Android platform target specified. Using default: Google Inc.:Google APIs:21
app/src/main/res/values/styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

app/src/main/res/values/styles.xml:14: error: Error: No resource found that matches the given name: attr 'actionBarSize'.

app/src/main/res/values-v21/styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

app/src/main/res/values/styles.xml:23: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

app/src/main/res/values/styles.xml:33: error: Error: No resource found that matches the given name: attr 'actionBarSize'.

app/src/main/res/values/styles.xml:29: error: Error: No resource found that matches the given name: attr 'colorPrimary'.

app/src/main/res/values/styles.xml:38: error: Error: No resource found that matches the given name: attr 'editTextColor'.

app/src/main/res/values-v21/styles.xml:14: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

app/src/main/res/values-v21/styles.xml:32: error: Error: No resource found that matches the given name: attr 'colorPrimary'.

BUILD FAILED: //app/src/main:main#aapt_package failed with exit code 1:
aapt_package
4

1 回答 1

3

下载 appcompat-aar 文件并在您的 anroid_resource 规则中用作依赖项

https://github.com/facebookarchive/AntennaPod/blob/buck/BUCK#L133 https://github.com/facebookarchive/AntennaPod/blob/buck/BUCK#L64

于 2015-09-18T04:56:24.037 回答