Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError GetViewModelFactoryKt #111

Open
MirzaUkas opened this issue Jun 29, 2024 · 1 comment
Open

NoClassDefFoundError GetViewModelFactoryKt #111

MirzaUkas opened this issue Jun 29, 2024 · 1 comment

Comments

@MirzaUkas
Copy link

✍️ Describe the bug

After following documentation and installing dependencies. I try to use explicitly method by calling DbInspector.show() but return this error

FATAL EXCEPTION: main
Process: id.logee.codebase, PID: 2644
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/koin/androidx/viewmodel/ext/android/GetViewModelFactoryKt;
	at com.infinum.dbinspector.ui.databases.DatabasesActivity$j.a(Unknown Source:19)
	at com.infinum.dbinspector.ui.databases.DatabasesActivity$j.invoke(Unknown Source:0)
	at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:47)
	at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:35)
	at com.infinum.dbinspector.ui.databases.DatabasesActivity.f(Unknown Source:2)
	at com.infinum.dbinspector.ui.databases.DatabasesActivity.onCreate(Unknown Source:34)
	at android.app.Activity.performCreate(Activity.java:8577)
	at android.app.Activity.performCreate(Activity.java:8541)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1437)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3884)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4049)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:211)
	at android.os.Looper.loop(Looper.java:300)
	at android.app.ActivityThread.main(ActivityThread.java:8348)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.koin.androidx.viewmodel.ext.android.GetViewModelFactoryKt" on path: DexPathList[[zip file "/data/app/~~Eou1kU7uL8JfMY1zuxI2Bw==/my.package.name-yIkbzBLX0ztCfJm9jxjnYQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~Eou1kU7uL8JfMY1zuxI2Bw==/my.package.name-yIkbzBLX0ztCfJm9jxjnYQ==/lib/arm64, /data/app/~~Eou1kU7uL8JfMY1zuxI2Bw==/my.package.name-yIkbzBLX0ztCfJm9jxjnYQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
	at com.infinum.dbinspector.ui.databases.DatabasesActivity$j.a(Unknown Source:19) 
	at com.infinum.dbinspector.ui.databases.DatabasesActivity$j.invoke(Unknown Source:0) 
	at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:47) 
	at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:35) 
	at com.infinum.dbinspector.ui.databases.DatabasesActivity.f(Unknown Source:2) 
	at com.infinum.dbinspector.ui.databases.DatabasesActivity.onCreate(Unknown Source:34) 
	at android.app.Activity.performCreate(Activity.java:8577) 
	at android.app.Activity.performCreate(Activity.java:8541) 
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1437) 
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3884) 
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4049) 
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) 
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) 
	at android.os.Handler.dispatchMessage(Handler.java:106) 
	at android.os.Looper.loopOnce(Looper.java:211) 
	at android.os.Looper.loop(Looper.java:300) 
	at android.app.ActivityThread.main(ActivityThread.java:8348) 
	at java.lang.reflect.Method.invoke(Native Method) 
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582) 
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028) 

💣 Steps to reproduce

  1. Installing the dependencies on my jetpack compose project (both in debug & release implementation)
  2. Calling DbInspector.show()
  3. Running on real device
  4. See error

🔧 Expected behavior

Db inspector running well and redirect to Db inspector activity

📷 Screenshots

📱 Tech info

  • Device: Xiaomi Poco M4 Pro
  • OS: Android 13
  • DB Inspector version: 5.4.9
  • Gradle version: 8.1.0
  • Kotlin version: 1.9.22

📄 Additional context

@MirzaUkas
Copy link
Author

I think this issue is related InsertKoinIO/koin#1416 . Maybe the use of viewModel() extension from "org.koin.androidx.viewmodel.ext.android" is the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant