You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.guadou.kt_demo/com.guadou.kt_demo.demo.demo11_fragment_navigation.Demo11Activity}: java.lang.RuntimeException: An exception happened in constructor of class com.github.fragivity.MyViewModel
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3773)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3952)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8169)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: java.lang.RuntimeException: An exception happened in constructor of class com.github.fragivity.MyViewModel
at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.java:126)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
at com.github.fragivity.FragivityUtil.loadRoot(Ext.kt:97)
at com.guadou.kt_demo.demo.demo11_fragment_navigation.Demo11Activity.init(Demo11Activity.kt:32)
at com.guadou.lib_baselib.base.activity.AbsActivity.onCreate(AbsActivity.kt:108)
at android.app.Activity.performCreate(Activity.java:8086)
at android.app.Activity.performCreate(Activity.java:8074)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3952)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8169)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: java.lang.NoSuchMethodError: No virtual method setSavedStateProvider(Ljava/lang/String;Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;)V in class Landroidx/lifecycle/SavedStateHandle; or its super classes (declaration of 'androidx.lifecycle.SavedStateHandle' appears in /data/app/com.guadou.kt_demo-eTQZfjBkcRgOq7DciVaGbg==/base.apk)
at com.github.fragivity.MyViewModel.(MyViewModel.kt:41)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.java:116)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
at com.github.fragivity.FragivityUtil.loadRoot(Ext.kt:97)
at com.guadou.kt_demo.demo.demo11_fragment_navigation.Demo11Activity.init(Demo11Activity.kt:32)
at com.guadou.lib_baselib.base.activity.AbsActivity.onCreate(AbsActivity.kt:108)
at android.app.Activity.performCreate(Activity.java:8086)
at android.app.Activity.performCreate(Activity.java:8074)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3952)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8169)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
升级到0.1.4 或者0.1.5就会报错 0.1.3可以正常使用
Originally posted by @liukai2530533 in #5 (comment)
The text was updated successfully, but these errors were encountered:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.guadou.kt_demo/com.guadou.kt_demo.demo.demo11_fragment_navigation.Demo11Activity}: java.lang.RuntimeException: An exception happened in constructor of class com.github.fragivity.MyViewModel
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3773)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3952)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8169)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: java.lang.RuntimeException: An exception happened in constructor of class com.github.fragivity.MyViewModel
at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.java:126)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
at com.github.fragivity.FragivityUtil.loadRoot(Ext.kt:97)
at com.guadou.kt_demo.demo.demo11_fragment_navigation.Demo11Activity.init(Demo11Activity.kt:32)
at com.guadou.lib_baselib.base.activity.AbsActivity.onCreate(AbsActivity.kt:108)
at android.app.Activity.performCreate(Activity.java:8086)
at android.app.Activity.performCreate(Activity.java:8074)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3952)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8169)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: java.lang.NoSuchMethodError: No virtual method setSavedStateProvider(Ljava/lang/String;Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;)V in class Landroidx/lifecycle/SavedStateHandle; or its super classes (declaration of 'androidx.lifecycle.SavedStateHandle' appears in /data/app/com.guadou.kt_demo-eTQZfjBkcRgOq7DciVaGbg==/base.apk)
at com.github.fragivity.MyViewModel.(MyViewModel.kt:41)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.java:116)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
at com.github.fragivity.FragivityUtil.loadRoot(Ext.kt:97)
at com.guadou.kt_demo.demo.demo11_fragment_navigation.Demo11Activity.init(Demo11Activity.kt:32)
at com.guadou.lib_baselib.base.activity.AbsActivity.onCreate(AbsActivity.kt:108)
at android.app.Activity.performCreate(Activity.java:8086)
at android.app.Activity.performCreate(Activity.java:8074)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3952)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8169)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
升级到0.1.4 或者0.1.5就会报错 0.1.3可以正常使用
Originally posted by @liukai2530533 in #5 (comment)
The text was updated successfully, but these errors were encountered: