Can not find MockWebServer class
See original GitHub issueI use testCompile add MockWebServer library ,but can not find MockWebServer class. My AndroidStudio version is 1.5.1.
compile 'com.squareup.okhttp3:okhttp:3.0.1'
testCompile 'com.squareup.okhttp:mockwebserver:2.7.2'
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
android studio - Unresolved Reference: mockwebserver
I found the culprit. When adding the dependency to the build.gradle file it should read implementation ...
Read more >How to Use MockWebServer to Mock and Test HTTP Calls
The first option is to run the Main class. However, this will require making a real HTTP request to an external API. That...
Read more >Change Log - OkHttp
The new APIs use mockwebserver3 in both the Maven coordinate and package name. This new API is not stable and will likely change...
Read more >The Recommended Way Of Testing HTTP Calls ... - Medium
A mock web server is a program that mocks the behavior of an actual remote server but doesn't make calls over the internet....
Read more >Testing Spring Boot WebClient With MockWebServer
Since it's communicating over an HTTP connection, it's not a unit test. Using MockWebServer is quite straightforward: public class ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I solved this problem by using androidTestCompile .
I think latest stable version is
androidTestImplementation "com.squareup.okhttp3:mockwebserver:3.10.0"