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

  • Home
  • SEARCH
  • 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 8262943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:55:40+00:00 2026-06-08T03:55:40+00:00

I am trying to setup an example project that uses Jake Wharton’s ActionBarSherlock with

  • 0

I am trying to setup an example project that uses Jake Wharton’s ActionBarSherlock with ActionBarSherlock-Plugin-Maps. I follow the instructions here and here. I do not necessarily need Fragments. Here is the simple class I created.

package com.example.actionbarsherlock;

import android.os.Bundle;
import com.actionbarsherlock.app.SherlockMapActivity;

public class MainActivity extends SherlockMapActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    protected boolean isRouteDisplayed() {
        return false;
    }
}

Although I tried to follow the exact descriptions I end up with a ClassNotFoundException when I launch the application. Here is the stacktrace.

  Unable to resolve superclass of Lcom/actionbarsherlock/app/SherlockMapActivity; (729)
  Link of class 'Lcom/actionbarsherlock/app/SherlockMapActivity;' failed
  Unable to resolve superclass of Lcom/example/actionbarsherlock/MainActivity; (533)
  Link of class 'Lcom/example/actionbarsherlock/MainActivity;' failed
 D/AndroidRuntime(408): Shutting down VM
  threadid=3: thread exiting with uncaught exception (group=0x4001b188)
  Uncaught handler: thread main exiting due to uncaught exception

  java.lang.RuntimeException: Unable to instantiate activity 
    ComponentInfo{com.example.actionbarsherlock/com.example.actionbarsherlock.MainActivity}: 
    java.lang.ClassNotFoundException: com.example.actionbarsherlock.MainActivity
    in loader dalvik.system.PathClassLoader@44e8ca40

    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
    at android.app.ActivityThread.access$2200(ActivityThread.java:119)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:4363)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    at dalvik.system.NativeStart.main(Native Method)

  Caused by: java.lang.ClassNotFoundException: com.example.actionbarsherlock.MainActivity 
    in loader dalvik.system.PathClassLoader@44e8ca40

    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
    ... 11 more
  threadid=7: reacting to signal 3
  Unable to open stack trace file '/data/anr/traces.txt': Permission denied

I tested the library before and created a subclass of SherlockActivity which worked fine. While doing so, I noticed that the same ClassNotFoundException occurs when I forget to configure the android:theme setting in AndroidManifest.xml. Here is the file for both (SherlockActivity and SherlockMapActivity) example projects, just in case:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.actionbarsherlock"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="15" />
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:theme="@style/Theme.Sherlock"
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest> 

Update:

After adding the uses-library setting as suggested by Raghav Sood and M Mohsin Naeem I run into the following message.

Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY

Here is a screenshot of my projects’ setup.

Package Explorer


Edit:

Maybe the .classpath file of my actionbarsherlocktest project helps …

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="src" path="gen"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
    <classpathentry kind="lib" path="libs/actionbarsherlock-plugin-maps-4.1.0.jar"/>
    <classpathentry kind="output" path="bin/classes"/>
</classpath>

The .classpath file of the library project looks exactly the same.


Solution to the INSTALL_FAILED_MISSING_SHARED_LIBRARY error message.

For some reasons Eclipse always started the emulator that was configured for API level 7 but without the Google API. I could not manage to force it to pick the “map-enabled” emulator. After I deleted the “map-less” emulator the application launched successfully. Do you know how this can happen?


Summary:

Finally, I got it running. Here are some experiences I like to share.

  • Download the latest version of ActionBarSherlock from the website.
  • Do not clone the repository in order to checkout the 4.1.0 tag (9598f2b). It did not work for me.
  • Setup the ActionBarSherlock library project in Eclipse.
  • Update the contained action-support-v4.jar to the latest version.
  • Add the actionbarsherlock-plugin-map-x.y.z.jar to the libs folder of the library project.
  • You do not need to add it to the build path of the library project.
  • Setup your main project and add the library project as a dependency.
  • You do not need to add the action-support-v4.jar or the actionbarsherlock-plugin-map-x.y.z.jar to your main project. It is also not necessary to add any of the .jar files to the build path of the main project.
  • A simple and helpful example to follow is available in the repository.
  • 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-06-08T03:55:41+00:00Added an answer on June 8, 2026 at 3:55 am

    There are only three reasons you will ever get this error:

    1. The class genuinely doesn’t exist. If you are using code from an official example and getting this, make sure you have the latest build of the library
    2. You have not added the jar to your build path. To fix this, right click on the jar in Eclipse, and do Build Path ► Add to Build Path.
    3. Your jar is not in the /libs folder. This happens when you have added the jar to the build path, but newer versions of ADT need it to be in /libs. Put it there and re-add it to the build path.

    You should also add

    <uses-library android:name="com.google.android.maps" />
    

    To your manifest file.

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

Sidebar

Related Questions

I'm trying to create a setup project using WIX that will allow me to
I'm trying to setup my project so that I can use querydsl-sql against a
I'm trying to create a website that will automate project setup. I want to
I'm trying to setup a project that contains commons apps (projectA) to be shared
I'm trying to automate the developer setup on a project, such that a new
Trying to setup a CodeIgniter based project for local development (LAMP stack), and once
Trying to setup and get going with the RestKit library for a cocoa project
I'm trying to create a setup project and I can't believe how painful it
I'm trying to setup a sample project using NHibernate and Fluent NHibernate. I am
All, This is a follow up for my question here . My setup: Visual

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.