litho
Ошибка
java.lang.NoSuchMethodError: Нет виртуального метода getBaseContext () Landroid / content / Context;в классе Lcom / facebook / litho / ComponentContext;или его суперклассы (объявление 'com.facebook.litho.ComponentContext' появляется в /data/app/com.midhilaj.myapplication-1/split_lib_dependencies_apk.apk)
Мой код
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final ComponentContext context = new ComponentContext(this);
Component component2 =GlideImage.create(context)
.imageUrl("https://d2b41ce3jhhjt0.cloudfront.net/uploads/social/posts/medium/c57365ec934af9814503ae2de8d252e9.jpg")
// .aspectRatio(aspectRatio)
.centerCrop(true)
.build();
setContentView(LithoView.create(context, component2));
Rejecting re-init on previously-failed class java.lang.Class<com.github.charbgr.litho.picasso.PicassoImage$PicassoImageImpl>: java.lang.LinkageError: Method java.lang.String com.github.charbgr.litho.picasso.PicassoImage$PicassoImageImpl.getSimpleName() overrides final method in class Lcom/facebook/litho/Component; (declaration of 'com.github.charbgr.litho.picasso.PicassoImage$PicassoImageImpl' appears in /data/app/com.midhilaj.myapplication-Aet8ZQAr7vjva0PZdq2jhg==/split_lib_dependencies_apk.apk)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at com.github.charbgr.litho.picasso.PicassoImage$Builder com.github.charbgr.litho.picasso.PicassoImage.create(com.facebook.litho.ComponentContext) (PicassoImage.java:170)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at void com.midhilaj.myapplication.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6984)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1235)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2857)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2986)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1671)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:108)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at void android.os.Looper.loop() (Looper.java:206)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6784)
2019-02-06 17:04:05.996 12850-12850/com.midhilaj.myapplication I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
2019-02-06 17:04:05.997 12850-12850/com.midhilaj.myapplication I/zygote64: at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240)
2019-02-06 17:04:05.997 12850-12850/com.midhilaj.myapplication I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:852)
2019-02-06 17:04:05.997 12850-12850/com.midhilaj.myapplication D/AndroidRuntime: Shutting down VM
2019-02-06 17:04:06.000 12850-12850/com.midhilaj.myapplication E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.midhilaj.myapplication, PID: 12850
java.lang.LinkageError: Method java.lang.String com.github.charbgr.litho.picasso.PicassoImage$PicassoImageImpl.getSimpleName() overrides final method in class Lcom/facebook/litho/Component; (declaration of 'com.github.charbgr.litho.picasso.PicassoImage$PicassoImageImpl' appears in /data/app/com.midhilaj.myapplication-Aet8ZQAr7vjva0PZdq2jhg==/split_lib_dependencies_apk.apk)
at com.github.charbgr.litho.picasso.PicassoImage.create(PicassoImage.java:170)
at com.midhilaj.myapplication.MainActivity.onCreate(MainActivity.java:45)
at android.app.Activity.performCreate(Activity.java:6984)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1235)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2857)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2986)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1671)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:206)
at android.app.ActivityThread.main(ActivityThread.java:6784)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:852)
Теперь я пытаюсь использовать Picasso
java.lang.LinkageError: Метод java.lang.String com.github.charbgr.litho.picasso.PicassoImage $ PicassoImageImpl.getSimpleName() переопределяет последний метод в классе Lcom / facebook / litho / Component;(объявление 'com.github.charbgr.litho.picasso.PicassoImage $ PicassoImageImpl' появляется в /data/app/com.midhilaj.myapplication-zt-xfqQ6-UlHEkWlTDfqyg==/split_lib_dependencies_apbith.char.char.char.char).litho.picasso.PicassoImage.create (PicassoImage.java:170) на com.midhilaj.myapplication.MainActivity.onCreate (MainActivity.java:44) на android.app.Activity.performCreate (Activity.java:6984) на android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1235) при android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2857) в android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2986) при android.app.ActivityThread.-wrap11(Неизвестный источник: 0) в android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1671) в android.os.Handler.dispatchMessage (Handler.java:108) в android.os.Looper.loop (Looper.java): 206) на android.app.ActivityThread.main (ActivityThread.java:6784) на java.lang.reflect.Method.invoke (собственный метод) на com.android.internal.os.Zygote $ MethodAndArgsCaller.run (Zygote.java:240) на com.android.internal.os.ZygoteInit.main (ZygoteInit.java:852)