GithubHelp home page GithubHelp logo

Comments (7)

ersin-ertan avatar ersin-ertan commented on April 26, 2024 1

Mac
Android Studio
E/AndroidRuntime
The app will run if setContentView(lithoView); is commented out.

Also, the github landing page and the getting started litho docs code differ but with no semantic difference.

final ComponentContext c = new ComponentContext(this);

    final LithoView lithoView = LithoView.create(
        this /* context */,
        Text.create(c)
            .text("Hello, World!")
            .textSizeDip(50)
            .build());
    
    setContentView(lithoView);

// vs

    final ComponentContext context = new ComponentContext(this);

    final Component component = Text.create(context)
        .text("Hello World")
        .textSizeDip(50)
        .build();

    setContentView(LithoView.create(context, component));

from litho.

passy avatar passy commented on April 26, 2024 1

@ersin-ertan Thanks for the details! I've never tried to run it on an x86_64 emulator myself. I'm doing that now.

from litho.

passy avatar passy commented on April 26, 2024 1

@ersin-ertan
It looks like the solution to this problem is actually incredibly boring. @rspencer01 fixed this exact problem and there has been a new release of the library. We did, however, forget to update the references in the tutorials to point to that release.

If you change this line to

compile 'com.facebook.soloader:soloader:0.2.0'

then everything is working again on x86_64.

Sorry for the confusion and thanks for raising this. I'll update the docs and close this afterwards.

from litho.

rspencer01 avatar rspencer01 commented on April 26, 2024 1

I thought this looked familiar! :D

from litho.

passy avatar passy commented on April 26, 2024

@ersin-ertan When are you seeing this error? Does this happen when you run it in Android Studio or with Gradle from the terminal? Could you give some information about the platform you're running this on? Linux, Mac, etc.?

from litho.

passy avatar passy commented on April 26, 2024

@ersin-ertan Thanks for your patience! I have been able to repro this. It seems like we've bundled the wrong architecture of libgnustl_shared.so into the last release of Yoga which does the layout.

As a workaround, you can use an x86 (32bit instead of 64bit) emulator for now. Sorry for that, we'll try to fix this as quickly as possible, but it will require a new release of Yoga and Litho.

/cc @emilsjolander

from litho.

passy avatar passy commented on April 26, 2024

Quick update: It's not the packaging. During SoLoader#initImpl we extract the wrong architecture to lib-main/. If you load the app on an x86_64 device and check the files under /data/user/.../litho-app/lib-main/*.so they're all ELF 32-bit LSB shared object and not 64-bit as they should.

/cc @rspencer01 Just in case you're interested because I know you've fought with this before.

from litho.

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.