Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6974183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:12:15+00:00 2026-05-27T17:12:15+00:00

I am trying to use a PageAdapter. I found out that public Object instantiateItem(

  • 0

I am trying to use a PageAdapter. I found out that public Object instantiateItem( View pager, int position ) has been deprecated. So I am trying up update but ran into a problem. The new definition changes the deceration to public Object instantiateItem( ViewPager pager, int position ), when I do this and push it to my device the app crashed.

Here is my logcat output.

12-26 19:24:30.701: ERROR/AndroidRuntime(25431): FATAL EXCEPTION: main
java.lang.UnsupportedOperationException: Required method instantiateItem was not overridden
at android.support.v4.view.PagerAdapter.instantiateItem(PagerAdapter.java:175)
at android.support.v4.view.PagerAdapter.instantiateItem(PagerAdapter.java:110)
at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:649)
at android.support.v4.view.ViewPager.populate(ViewPager.java:783)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1016)

So I added @Override to the method call, but when I compile it ,using maven, I get the following output that corresponds to my method.

Chronos/ChronosApp/src/com/kopysoft/chronos/view/ClockViewer.java:[67,4] error: method does not override or implement a method from a supertype

I am at a lose as what to do. Any advice would be greatly appreciated!

The entire code can be found here: http://pastebin.com/da5Kqcmg

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:12:16+00:00Added an answer on May 27, 2026 at 5:12 pm

    The runtime code in PagerAdapter.instantiateItem() is throwing the exception because it wants you to override that. So make sure you are overriding the method that is throwing the exception. You probably just want to switch your code back to overriding the deprecated method since that’s what your runtime library is expecting.

    Might it be possible that you have an older runtime you are running with?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying use javascript regular expressions to do some matching and I found
I have been trying use the edit_post_link() function to contain an image. All of
I'm a little confused here, I am trying use a partial view in a
I'm trying to build an Activity that will serve as a Calendar Day View.
I'm trying use eco for client-side templating. I have multiple .eco templates that I'd
I am trying use a from a multi-dimensional array that I create in another
I have a regex that I'm trying use to validate against strings. Trying to
I have a 3rd party DLL that I am trying to use in a
I'm trying use an object which wasn't available until SDK level 5. It seems
I am trying use the jQuery table sorter plugin for a table that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.