Didn't find class “androidx.core.app.CoreComponentFactory”

前端 未结 10 1295
一向
一向 2020-12-03 06:40

I don\'t know what to do about the following errors, I\'ve searched the web but not found anything:

java.lang.ClassNotFoundException: Didn\'t find class \"an         


        
10条回答
  •  生来不讨喜
    2020-12-03 07:08

    It may sound totally unrelated, but I have seen this problem also when by mistake I have overridden wrong on Activity#onCreate() method i.e.

    public void onCreate(@Nullable Bundle savedInstanceState,
            @Nullable PersistableBundle persistentState)
    

    Instead of

    protected void onCreate(@Nullable Bundle savedInstanceState)
    

    So, please check that also. The second one is the one that you probably need.

    Please refer to the documentations for the details of these two methods.

提交回复
热议问题