Skip to content

java.lang.NoSuchMethodError: No static method getNetworkType #177

Open
@umer7267

Description

The app is crashing on initializing Kohii library in fragment Java:

kohii = Kohii.get(context);
kohii.register(this).addBucket(binding.postsList);

Full logcat:

2022-02-25 15:30:26.103 32073-32073/com.levelx.admin E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.levelx.admin, PID: 32073
java.lang.NoSuchMethodError: No static method getNetworkType(Landroid/content/Context;)I in class Lcom/google/android/exoplayer2/util/Util; or its super classes (declaration of 'com.google.android.exoplayer2.util.Util' appears in /data/app/~~L_MC3lYv70hKbegbb7nL9w==/com.levelx.admin-Ap8VRv30f8fHLx7y1mmokg==/base.apk!classes13.dex)
at kohii.v1.core.Master.(Master.kt:155)
at kohii.v1.core.Master.(Master.kt:69)
at kohii.v1.core.Master$Companion.get(Master.kt:84)
at kohii.v1.exoplayer.Kohii.(Kohii.kt:49)
at kohii.v1.exoplayer.Kohii.(Kohii.kt:43)
at kohii.v1.exoplayer.Kohii$Companion$capsule$1.invoke(Kohii.kt:53)
at kohii.v1.exoplayer.Kohii$Companion$capsule$1.invoke(Kohii.kt:51)
at kohii.v1.utils.Capsule.getInstance(Capsule.kt:44)
at kohii.v1.utils.Capsule.get(Capsule.kt:54)
at kohii.v1.exoplayer.Kohii$Companion.get(Kohii.kt:56)
at kohii.v1.exoplayer.Kohii.get(Unknown Source:2)
at com.levelx.admin.home.HomeFragment.onViewCreated(HomeFragment.java:312)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3019)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:551)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:113)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1374)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2841)
at androidx.fragment.app.FragmentManager.dispatchViewCreated(FragmentManager.java:2777)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3020)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:551)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:113)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1374)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2841)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2784)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:262)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:478)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:246)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1485)
at android.app.Activity.performStart(Activity.java:8143)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3780)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2319)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:257)
at android.app.ActivityThread.main(ActivityThread.java:8218)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:626)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1016)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions