Giter Club home page Giter Club logo

Comments (2)

kropp avatar kropp commented on August 22, 2024

There are two overloads for layout on Android, and just a single one in Compose Multiplatform.
Judging from the exception, it seems that some multiplatform artifact is packed into an android app, while during the compilation the correct one is used.
Can you check the dependencies, please?
Unfortunately, I wasn't able to reproduce this issue on the sample project on my machine.

from compose-multiplatform.

firelion9 avatar firelion9 commented on August 22, 2024

I checked my dependencies, everything looks fine: all compose mutiplatform dependencies are compile-only and androidx.compose.ui:ui-android:1.6.7 is presented in both compile and runtime classpaths of app module. I also checked MeasureScope definition in android and desktop variants of androidx.compose.ui:ui and they both contain single layout overload:

fun layout(
        width: Int,
        height: Int,
        alignmentLines: Map<AlignmentLine, Int> = emptyMap(),
        placementBlock: Placeable.PlacementScope.() -> Unit
    ): MeasureResult { /* ... */ }

Are you sure we are speaking about the same layout?

Unfortunately, I currently have access to a single windows machine only, but I tried to compile the sample project again from a clean checkout on it with the same result: successful run with android studio's run action and crash when compiling with ./gradlew :app:assembleDebug or with "generate signed app bundle / apk".

I also inspected generated apks and found out that in crashing apks required method is presented in MeasureScope$-CC instead of MeasureScope, but I still don't understand why it happens and why it doesn't happen with android studio's run action

from compose-multiplatform.

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.