English 中文(简体)
如果我不像一部法典那样使用图书馆,那么这种错误是什么?
原标题:What is this error and why this doesn t happen when I don t use library like a code instead like an aar?
  • 时间:2019-11-27 10:11:48
  •  标签:
  • java
  • android

我正在开发一个星体内的图书馆,我用两种方式对它进行测试,一种是使用密码的图书馆,另一种是手法。

Of course, I test all the library in the app with code version, after this, I try to test the app with the aar.

但是,在处决 app子时,我发现错误。

2019-11-27 10:44:19.795 26687-26687/? E/AndroidRuntime: FATAL EXCEPTION: main Process: apps, PID: 26687 java.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)" at androidx.lifecycle.FullLifecycleObserverAdapter.onStateChanged(FullLifecycleObserverAdapter.java:34) at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:361) at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.java:188) at SDK.initSDK(SourceFile:15) at SDK.initSDK(SourceFile:13) at apps.SApplication.onCreate(SApplication.java:20) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1155) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5885) at android.app.ActivityThread.access$1100(ActivityThread.java:200) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1651) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6692) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

资料来源:15和13。

如果图书馆完全符合该守则,那么我会发现这一错误?

感谢。

问题回答

答案迟缓,但突然有人会伸出手。

Seems such as You are implementing DefaultLiferix Observer 某些地方,而不是凌驾于<代码>DefaultLifeaging Observer。

Just override ALL DefaultLifecycleObserver s methods and remove super call from them. It should work just fine

从21世纪提升到24世纪的你精彩的版本能够解决这一问题。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签