Comments (8)
Unfortunately I haven't -- I actually stopped using OkReplay for separate reasons soon after this issue popped up. I think I have a pretty good idea of what needs to be done to fix this issue, though (adopting the BaseExtension#deviceProviders
API), and I may have some time this weekend to work on a PR.
from okreplay.
For anyone who might want to use OKReplay in there project with AGP >= 4.0 I followed @jschear steps but instead of fixing the okreplay-tests
for reasons mentioned by him I removed that module from settings.gradle while building.
Please note this is not an official solution and something I did to get it working in my project.
You can find the gist here - https://gist.github.com/stopdrake/0e6607d4a12112d1909320eacf5245cc
Steps to run
- Copy the jar file to a
gradleLibs
orlibs
directory inside your module - In your module level build.gradle add classpath to your buildscript dependencies like below
buildscript {
repositories {
jcenter()
google()
}
dependencies {
// classpath "com.airbnb.okreplay:gradle-plugin:$okreplay_gradle"
classpath files('gradleLibs/okreplay-gradle-plugin-1.6.0.jar')
}
}
from okreplay.
I think I was wrong about moving to the BaseExtension#deviceProviders
being a solution -- that function returns an empty list when I test locally, and it appears to be an extension point for adding other, custom DeviceProvider
s.
I see a few ways forward here:
- Do some sort of reflection to load the
DeviceProvider
class from the correct package depending on the version of AGP that's on the classpath. - Copy
ConnectedDeviceProvider
into okreplay's source tree and call it a day.
@felipecsl, @rossbacher do either of you have an opinion here?
from okreplay.
Is this issue resolved ? I am encountering similar issue.
I am exploring okreplay to use in my project at this point.
from okreplay.
Hey @jschear. We are facing this same problem after upgrading to AGP 4.0.0 . Were you able to solve this or have a workaround?
from okreplay.
Like @rajab57, I would like to use OkReplay, but it's not working with AGP >= 4.0 :(
The @stopdrake's solution seems to work but it would be nice if you can fix it
from okreplay.
The above workaround seems to have stopped working, I now get this error:
Execution failed for task ':app:clear<variant>OkReplayTapes'.
> 'void com.android.build.gradle.internal.testing.ConnectedDeviceProvider.<init>(java.io.File, int, com.android.utils.ILogger)'
I am using the following versions:
OkReplay: 1.6.0 (both workaround, and official version)
AGP: 7.1.0-alpha05
AndroidX Test: 1.4.0
Espresso: 3.4.0
from okreplay.
I have also tried the above and get the same error with:
OkReplay: 1.6.0 (both workaround, and official version)
AGP: 7.1.2
AndroidX Test: 1.4.0
Espresso: 3.4.0
Please fix this as it is holding our project up from upgrading the gradle plugin.
from okreplay.
Related Issues (20)
- To make OkReplayInterceptor open again. HOT 2
- ConnectedDeviceProvider should be closed after use
- Update to latest espresso? HOT 3
- Cannot build project HOT 2
- Requests indexation
- Cannot query the value of property 'applicationId' HOT 2
- Transitive dependency on vulnerable `org.yaml:snakeyaml`
- Are you interested in help to create support for Junit5?
- Replace data in yaml file with fake data in @Before setUp() method
- Work together with RoboElectric HOT 2
- Make Optional public HOT 4
- Can OkReplay works with Protocol Buffer? HOT 1
- Make it work with androidx
- Build issue with customized okreplay HOT 1
- Possible to get a new release cut? HOT 6
- Multiple flavours wrong pull directory HOT 2
- NoSuchMethodError (GlobalScope.getAndroidBuilder) with android gradle plugin 3.5.0-beta01 HOT 6
- Gradle plugin checks for connected devices at configuration time HOT 2
- Cannot use plugin 1.5.0 with AGP 3.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okreplay.