java.lang.IllegalStateException

ViewPager with adapter lii2.github.com.popupapp.MainActivity$MyPagerAdapter@316fcff requires a view id

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web8929

  • via Stack Overflow by Chi-Young Jeffrey Lii
    , 10 months ago
    ViewPager with adapter lii2.github.com.popupapp.MainActivity$MyPagerAdapter@316fcff requires a view id
  • ViewPager with adapter com.example.locale.tablayoutdynamicsample.ViewPagerAdapter@3b0e90d6 requires a view id
  • ViewPager does not have adapter instance.
  • Stack trace

    • java.lang.IllegalStateException: ViewPager with adapter lii2.github.com.popupapp.MainActivity$MyPagerAdapter@316fcff requires a view id at android.support.v4.app.FragmentPagerAdapter.startUpdate(FragmentPagerAdapter.java:81) at android.support.v4.view.ViewPager.populate(ViewPager.java:1117) at android.support.v4.view.ViewPager.populate(ViewPager.java:1085) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1611) at android.view.View.measure(View.java:18788) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18788) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18788) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2100) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1191) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1452) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) at android.view.Choreographer.doCallbacks(Choreographer.java:670) at android.view.Choreographer.doFrame(Choreographer.java:606) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    4 times, 5 months ago
    Once, 10 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    7 more bugmates