Coder Social home page Coder Social logo

Comments (8)

boourns avatar boourns commented on May 5, 2024

just fixing the error message in this case to not suggest WRITE_EXTERNAL_STORAGE is missing would help people not get stuck

from screenshot-tests-for-android.

tdrhq avatar tdrhq commented on May 5, 2024

hmm, I admit I haven't been testing this on M devices.

Since the installation happens with gradle and using Android's gradle set up, don't they already set up the permissions correctly for typical instrumentation tests?

from screenshot-tests-for-android.

tdrhq avatar tdrhq commented on May 5, 2024

@boourns what would the ideal message here be to make it more parseable?

from screenshot-tests-for-android.

boourns avatar boourns commented on May 5, 2024

This URL is an example of maybe the same bug that is being hit here. The workaround suggested (killing the app) I don't think would work with tests.

http://stackoverflow.com/questions/33062006/cant-write-to-external-storage-unless-app-is-restarted-after-granting-permissio

@josephmbeveridge could this gradle plugin be changed to install the apk using -g? Would that resolve the issue?

@tdrhq If you wanted to be clever, determine if the app has been built against 23 and is running on 23 to emit an error specifically about this issue, but alternately just mentioning this in a longer error message would be less misleading for people who hit this case. I myself spent a day banging my head against the wall trying to figure it out :)

from screenshot-tests-for-android.

josephmbeveridge avatar josephmbeveridge commented on May 5, 2024

@boourns @tdrhq Yes, changing the plugin to install the apk using -g should fix the permissions issues on api 23 emulators.

from screenshot-tests-for-android.

tdrhq avatar tdrhq commented on May 5, 2024

@boourns Regarding installing with -g, the installation happens from the Android gradle plugin, so I'm surprised they don't already handle this. I imagine this is an issue with all kinds of instrumentation tests.

from screenshot-tests-for-android.

tdrhq avatar tdrhq commented on May 5, 2024

@boourns I'm closing this task since it should be part of the Android Gradle plugin, let me know if there's something actionable on my part. Thanks for the report!

from screenshot-tests-for-android.

jimgoog avatar jimgoog commented on May 5, 2024

To be clear: After PR #29 got merged, setting the compile target to API22 is not sufficient. Your emulator must also be using API level 22 or lower.

@tdrhq Do you know if this was ever fixed in later versions of the Android Gradle Plugin? If it was not fixed, can you file a bug on AndroidStudio and link to the bug from here?

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.