0

I'm trying to build my android app. I have a default, unmodified activity using a tabbed pageradapter fragment template, however I get an error from logcat stating:

06-24 15:08:18.771: W/dalvikvm(21676): Unable to resolve superclass of Lcom/humbell/infinibook/ExploreActivity; (23)
06-24 15:08:18.771: E/dalvikvm(21676): Could not find class 'com.humbell.infinibook.ExploreActivity', referenced from method com.humbell.infinibook.MainActivity$2.onClick

I am using no external libraries libraries, so am confused to what is happening. I think it's down to the support libraries but am not surehow to check really - the configuration is a okay.

I have uninstalled and fully wiped my SDK, but still no joy.

This is really baffling me.

I also have problem creating other activity's too... with the exact same errors...

Thanks for your time.

Nathan.

EDIT:

I haven't modified any of the code from my activity. The ExploreActivity is generated from the Eclipse/ADT. I only get the error if I use Tabbed activities - if I use a default blank activity, without any tab navigation, it runs fine - which suggest to me it's something to do with the support libraries, as thats what the tabbed activity use - however - Everything is default and fine.

I have checked pro guard - it's not enabled.

I haven't a clue whats wrong.

ADT is version : v22.0.1-68570

And here's the code for the explore activity:

  • 1
    What's the `MainActivity` superclass? What's `com.humbell.infinibook.ExploreActivity`? – Dave Newton Jun 24 '13 at 14:20
  • Have you defined all your activities in your `manifest.xml`? – Ken Wolf Jun 24 '13 at 14:20
  • Also, which ADT version do you have? – verybadalloc Jun 24 '13 at 14:27
  • This is probably caused by proguard, removing your super class `ExploreActivity`. Try to deactivate proguard to see if this is the cause. http://developer.android.com/tools/help/proguard.html – sulai Jun 24 '13 at 14:28
  • How are you defining your Activities in the manifest? Are you Activities in specific packages and are you using the fully qualified name for the "android:name" attributes? – Jade Byfield Jun 24 '13 at 18:24
  • Check if maybe the [Build Path settings for your project is not set correctly (related to ADT update)](http://stackoverflow.com/questions/16610190/classnotfoundexception-after-adt-update). – Joe Jun 24 '13 at 18:53
  • Activities are inside com.humbell.infinibook package, and use that URI as a prefix. (ie com.humbell.infinibook.ExploreActivity), I'll check my build settings in a moment. – Nathaniel Bennett Jun 24 '13 at 20:07
  • SUCCESS! Whoop! Thanks a lot guys. It was the my build path. The answers are in the link Joe sent me. @Joe if you put your comment as an answer I'll mark it. Thanks. – Nathaniel Bennett Jun 24 '13 at 20:17

2 Answers2

1

You need to check you build path. In eclipse, go to Project>Preferences>Java Build Path>Order and Export Make sure you have the android private libraries checked. Then Project>Clean... All done!

0

Right click the project - Select properties - Java Build Path - Order and Export, and make sure that Android Private Libraries are checked.

CSharp
  • 1,573
  • 2
  • 14
  • 25