Comments (7)
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.
@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.
@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.
I thought this looked familiar! :D
from litho.
@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.
@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.
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)
- FrescoImage can't support ScaleType well HOT 3
- visibleHandler and invisibleHandler is not effective HOT 1
- Relocate Litho dependencies in a location other than JCenter. HOT 1
- Paint Flags support HOT 1
- ClickEvent beyond recycler HOT 4
- TextInput with RTL makes ViewPager jump between pages HOT 1
- Elements outside the viewport are not drawn on entering HOT 2
- Litho HOT 1
- Automirrored vector drawables do not get mirrored when layout is RTL HOT 2
- HorizontalScroll should provide the ability to fade edges HOT 3
- how do you update state from a Android Fragment/View parent? like React's useImperativeHandle
- Are there any plans to replace unsupported APIs (KEYCODE_BACK and #onBackPressed) to support Android's new Predictive back gesture?
- OnUpdateState not invoke on parent recycler component
- How to update prop value of MountSpec from LayoutSpec
- How does Litho (Kotlin API) compare to Compose? HOT 1
- Lazy list not working in project getting error HOT 4
- ContentAllocator API not working HOT 14
- NullPointerException in TextDrawable.Draw, seemingly from a race condition in ComponentHost$InterleavedDispatchDraw
- Setting a background to a container using Style.background(dynamicValue: DynamicDrawable) draws outside of bounds of parent. HOT 1
- Dimension error when adding flexure process
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from litho.