Giter Club home page Giter Club logo

Comments (7)

pyricau avatar pyricau commented on May 29, 2024 1

Checking if compose is available by calling ComposeViews.isComposeAvailable causes the loading of the ComposeViews which causes the init of the VIEW_KEYED_TAGS_FIELD field:

private val VIEW_KEYED_TAGS_FIELD = View::class.java.getDeclaredField("mKeyedTags")

https://github.com/square/radiography/blob/main/radiography/src/main/java/radiography/internal/ComposeViews.kt#L15

This private field was added in 2011 https://cs.android.com/android/_/android/platform/frameworks/base/+/7db82acd8151684a886d4725ddf2790ef3a2f80e:core/java/android/view/View.java;dlc=e94d950d122005bb10e11dd18b6029d0108f2fbe

cc @zach-klippenstein we should probably do two things:

  1. maybe don't init the rest of the class helpers when compose isn't in the classpath
  2. Degrade gracefully if we can't find this field?

from radiography.

zach-klippenstein avatar zach-klippenstein commented on May 29, 2024 1

Planning to release today.

from radiography.

zach-klippenstein avatar zach-klippenstein commented on May 29, 2024

We should definitely just fail gracefully if it's not found, all this reflection stuff should be as forgiving as possible.

from radiography.

yoavgray avatar yoavgray commented on May 29, 2024

from radiography.

zach-klippenstein avatar zach-klippenstein commented on May 29, 2024

If this private field was added in 2011, but @yoavgray is seeing crashes on Android 11, which definitely has this field. I guess just vivo devices don't? Anyway, PR is up to fail gracefully: #122.

from radiography.

Ashok-Varma avatar Ashok-Varma commented on May 29, 2024

Hi @zach-klippenstein / @pyricau any timeline on when this fix will be released ?

from radiography.

zach-klippenstein avatar zach-klippenstein commented on May 29, 2024

Done: https://github.com/square/radiography/releases/tag/v2.2.0

from radiography.

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.