GithubHelp home page GithubHelp logo

Android Studio 4.2 canary 10 Preview Render Problem: java.lang.AssertionError: Unsupported Service: activity about accompanist HOT 7 CLOSED

mr3y-the-programmer avatar mr3y-the-programmer commented on May 8, 2024
Android Studio 4.2 canary 10 Preview Render Problem: java.lang.AssertionError: Unsupported Service: activity

from accompanist.

Comments (7)

colinrtwhite avatar colinrtwhite commented on May 8, 2024 1

Thanks for the heads up! I think coil-kt/coil#541 should fix the issue.

from accompanist.

chrisbanes avatar chrisbanes commented on May 8, 2024 1

Thanks @colinrtwhite 🙌

from accompanist.

chrisbanes avatar chrisbanes commented on May 8, 2024 1

Interesting! We haven't updated to the new (upcoming) Coil with the fix yet. Maybe Android Studio 4.2.0 C13 has a fix in it? Either way, glad it's fixed

from accompanist.

nickbutcher avatar nickbutcher commented on May 8, 2024

Looks like it's not finding a Context which we added for the imageLoader default param.

from accompanist.

chrisbanes avatar chrisbanes commented on May 8, 2024

It's getting a context, but it's the special layoutlib com.android.layoutlib.bridge.android.BridgeContext, which doesn't seem to support getSystemService(ActivityManager). Coil uses it find to determine the cache size.

/cc @colinrtwhite

from accompanist.

mr3y-the-programmer avatar mr3y-the-programmer commented on May 8, 2024

Yeah! that makes sense because it works at runtime when you have an activity instance running so you have a valid Context, But as I said you can't use it in any @Preview function at compile time because there is no way to get a context

from accompanist.

mr3y-the-programmer avatar mr3y-the-programmer commented on May 8, 2024

Thanks, @colinrtwhite, @chrisbanes preview no longer complains with the release of v0.3.0 which fixes the issue

from accompanist.

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.