Gradle 构建 android-support-test 项目时出错

Gradle error when building the android-support-test project

我正在尝试构建 Android 支持测试项目。我正在关注 these instructions。我已经设置好构建环境并同步了 Repo。当我尝试构建项目时出现此错误。

$ pwd
/Volumes/android/android-support-test

$ ls -l
-r--r--r--   1 me  staff    87 Feb  5 12:56 Makefile
-rw-r--r--   1 me  staff   749 Feb  5 16:14 android-support-test.iml
drwxr-xr-x  11 me  staff   374 Feb  5 12:56 build
lrwxr-xr-x   1 me  staff    31 Feb  5 12:57 build.gradle -> frameworks/testing/build.gradle
drwxr-xr-x  16 me  staff   544 Feb  5 12:57 external
drwxr-xr-x   4 me  staff   136 Feb  5 12:57 frameworks
drwxr-xr-x   3 me  staff   102 Feb  5 16:14 gradle
-r-xr-xr-x   1 me  staff  5884 Feb  5 12:57 gradlew
lrwxr-xr-x   1 me  staff    35 Feb  5 12:57 local.properties -> frameworks/testing/local.properties
drwxr-xr-x   3 me  staff   102 Feb  5 16:17 out
drwxr-xr-x   7 me  staff   238 Feb  5 12:57 prebuilts
lrwxr-xr-x   1 me  staff    34 Feb  5 12:57 settings.gradle -> frameworks/testing/settings.gradle

$ ./gradlew assembleDebug
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.5/userguide/gradle_daemon.html.
Configuration on demand is an incubating feature.

FAILURE: Build failed with an exception.

* Where:
Build file '/Volumes/android/android-support-test/frameworks/testing/build.gradle' line: 16

* What went wrong:
A problem occurred evaluating root project 'android-support-test'.
> Could not read script '/Volumes/android/android-support-test/version.gradle' as it does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.31 secs

version.gradle 文件在 /Volumes/android/android-support-test/frameworks/testingbuild.gradle 正在 /Volumes/android/android-support-test 中寻找它。

我认为 build.gradle -> frameworks/testing/build.gradle 的别名无法正常工作。我错过了什么吗?

frameworks/testing Repo 项目应该包含一个额外的符号 link,但您可以自己创建它:

ln -s frameworks/testing/version.gradle version.gradle

h/t 致 John Lombardo on the Android Testing Support Library google group