Skip to content

Build Failures for android-testing #50

@mejohnsn

Description

@mejohnsn

I just did the git clone for the android-testing project about a half-hour ago and imported the project using Android Studio as the instructions suggest. I got a warning message complaining about VCS but no root, so I selected "Add Root". That allowed the import to complete and display files, but with some build errors, to wit:

  1. BasicSample-app: MainActivity won't build because R not found. Of course, I have seen this often enough before in both Eclipse and Android Studio, the solution in either case seems to be about the same. So I am more concerned about:

  2. espresso-BasicSample-app builds and runs, but the test does not build , complaining that it cannot find AndroidJUnit4.class. Even more surprising, in the import android.support.test.runner.AndroidJUnit4, it complains it cannot even find runner, though I do have the directory /opt/adt-bundle-mac-x86_64-20140702/sdk/extras/android/m2repository/com/android/support/test/runner (yes, I installed the bundle under Mac OSX, this was the default at the time) and I followed the instructions (long ago, actually) for downloading the Android Support Repository and Android Support Library. That said, I do have to point out that the instructions for the latter do not actually say to add the mentioned changes to the dependencies in the Gradle files, so I did not follow that part, leaving it up to the imported project to set those (hopefully correctly).

BTW: if adding those dependencies is the way to fix this, then WHICH "Gradle file" are they referring to at https://developer.android.com/tools/testing-support-library/index.html#setup when they say, " add these dependencies in your build.gradle file??

Finally, just in case it is relevant, the contents of the above runner directory contain jars for javadocs and source for runner-0.2 and runner-0.3, nothing for AndroidJUnit4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions