Thursday, April 19, 2012

problems overriding android compatibility methods

I had a class that extended android.support.v4.app.FragmentActivity. I wanted to override onRetainCustomNonConfigurationInstance, and I ran into the following error, indicating FragmentActivity didn't have that method:

The method onRetainCustomNonConfigurationInstance() of type ... must override or implement a supertype method


here's how to fix it:

  1. open the android SDK manager


  2. update the compatibility package


  3. copy the updated compatibility package to the /libs folder of your project. see here for where to find the compatibility package: http://developer.android.com/sdk/compatibility-library.html#SettingUp




that last part's what got me; I assumed updating the compatibility package would update it in my project :P

0 comments:

Post a Comment