Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: package android.support.test.rule does not exist #3

Closed
Phlip opened this issue Jun 9, 2019 · 2 comments
Closed

error: package android.support.test.rule does not exist #3

Phlip opened this issue Jun 9, 2019 · 2 comments

Comments

@Phlip
Copy link

Phlip commented Jun 9, 2019

I can run the unit tests, but I can't run ActivityTests. I always get:

error: package android.support.test.rule does not exist

The reply here, firebase/codelab-friendlychat-android#65 , says to add androidTestImplementation 'com.android.support.test:rules:1.0.2' to app/build.gradle, but that didn't work.

The versions are Android 8.0.0 API 26.

Other than that thanks for the awesome tutorial - everyone should TDD everywhere, but of course many platforms, such as Android, make it unnecessarily hard

@Phlip
Copy link
Author

Phlip commented Jun 13, 2019

One Rapunzel Van Winkle figured it out. We need to upgrade from com.android to androidx:

https://stackoverflow.com/questions/56532069/android-espresso-activitytest-gives-package-android-support-test-rule-does-not

@NileshJarad
Copy link
Owner

Thanks @Phlip. As issue resolved I am closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants