android中引入yoga

新版的yoga直接在gradle中就可以导入了

gradle配置:

implementation ‘com.facebook.yoga.android:yoga-layout:1.16.0‘
implementation ‘com.facebook.soloader:soloader:0.9.0‘
implementation ‘com.facebook.fbjni:fbjni:0.0.2‘

 

SoLoader要先初始化:

SoLoader.init(this, false);

 

如下方法创建YogaNode:

new YogaNodeJNIFinalizer();

 

不引入fbjni会报如下错误:

SoLoader: couldn‘t find DSO to load: libyoga.so caused by: couldn‘t find DSO to load: libfb.so caused by: Didn‘t find class "com.facebook.jni.HybridData$Destructor" 

android中引入yoga

上一篇:AutoPy轻松实现python操作android,实现安卓手机自动化操作!


下一篇:org.apache.ibatis.binding.BindingException: Type interface pers.zhb.dao.StudentDao is not known to the MapperRegistry.