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

时间:2016-02-05 21:38:38

标签: android-testing

我正在尝试构建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/testing,但build.gradle正在/Volumes/android/android-support-test中查找。

我认为build.gradle -> frameworks/testing/build.gradle的别名无效。我错过了什么吗?

1 个答案:

答案 0 :(得分:2)

receive Repo项目应该包含一个额外的sym链接,但你可以自己创建它:

frameworks/testing

致John Lombardo on the Android Testing Support Library google group