Coder Social home page Coder Social logo

pullScreenshots fails with "Expected task ':app:packageDebugAndroidTest' output files to contain exactly one file, however, it contains 2 files" about screenshot-tests-for-android HOT 9 CLOSED

facebook avatar facebook commented on May 5, 2024
pullScreenshots fails with "Expected task ':app:packageDebugAndroidTest' output files to contain exactly one file, however, it contains 2 files"

from screenshot-tests-for-android.

Comments (9)

gpeal avatar gpeal commented on May 5, 2024

I'm still unable to get this working in my library due to the error above. I'm using version 0.4.1 and here is the gradle logs with --info --debug
https://gist.github.com/gpeal/8ce20024af55a710c8be50e5ea489e6e

from screenshot-tests-for-android.

gpeal avatar gpeal commented on May 5, 2024

The project is a gradle project with 2 modules, an Android library and an Android application. The application depends on the library and only the application applies the plugin.
There are no custom flavors.

EDIT:
I did some digging by cloning the repo and printing out the output paths and these are the 2 that are found in ScreenshotsPlugin#getTestApkOutput:

  1. /Users/.../Lotte/LotteSample/build/intermediates/incremental/packageDebugAndroidTest
  2. /Users/.../Lotte/LotteSample/build/outputs/apk/LotteSample-debug-androidTest.apk

from screenshot-tests-for-android.

niravnagda avatar niravnagda commented on May 5, 2024

@gpeal did you solve this issue?

from screenshot-tests-for-android.

brianguertin avatar brianguertin commented on May 5, 2024

I ran into this issue when updating to com.android.tools.build:gradle:2.2.0.

Switching back to com.android.tools.build:gradle:2.1.3 works around the issue, so it appears to be an incompatibility with version 2.2.0 specifically.

from screenshot-tests-for-android.

tdrhq avatar tdrhq commented on May 5, 2024

I was able to repro on 2.2.0, thanks for the info @brianguertin!

Trying to figure this out, will keep you posted. (I'm not exactly a gradle expert, so any hints are welcome)

from screenshot-tests-for-android.

tdrhq avatar tdrhq commented on May 5, 2024

Okay fix has landed: d84e7ab

If somebody can :plugin:install locally and verify that this works for them, I can publish a new minor release. Thanks!

from screenshot-tests-for-android.

gpeal avatar gpeal commented on May 5, 2024

I can't test the local install today (how does :plugin:install work by the way?).
However, a couple of weeks ago, I made a local fix very similar to yours and it fixed it for me so if you want to bump the version and push to maven, I can try that.

from screenshot-tests-for-android.

tdrhq avatar tdrhq commented on May 5, 2024

@gpeal, :plugin:install would install it to your local maven repository, so then you can use it to build your actual app instead of downloading the jar from mavencentral or the likes.

In any case, I'll bump up the version today and close out this task then.

from screenshot-tests-for-android.

tdrhq avatar tdrhq commented on May 5, 2024

Version bumped to 0.4.2, thanks for the report!

from screenshot-tests-for-android.

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.