Giter Club home page Giter Club logo

Comments (8)

jschear avatar jschear commented on June 5, 2024 2

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.

stopdrake avatar stopdrake commented on June 5, 2024 2

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

  1. Copy the jar file to a gradleLibs or libs directory inside your module
  2. 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.

jschear avatar jschear commented on June 5, 2024 1

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 DeviceProviders.

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.

rajab57 avatar rajab57 commented on June 5, 2024 1

Is this issue resolved ? I am encountering similar issue.
I am exploring okreplay to use in my project at this point.

from okreplay.

stopdrake avatar stopdrake commented on June 5, 2024

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.

mfekim avatar mfekim commented on June 5, 2024

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.

KatieBarnett avatar KatieBarnett commented on June 5, 2024

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.

KatieBarnett avatar KatieBarnett commented on June 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.