Getting java.lang.ClassNotFoundException (Unable to instantiate activity ComponentInfo)

204 views
Skip to first unread message

Jerrell Mardis

unread,
Nov 12, 2012, 10:22:16 PM11/12/12
to android-support-v4...@googlegroups.com
I've seen the following error a few times during the development cycle and now I just received an error report. I have no idea what's causing this. After reading similar questions on stackoverflow regarding this issue, I double checked my AndroidManifest and everything looks fine to me. Any ideas on what could possibly be causing this exception?

Another thing to note is that I'm using a few open-source libs that may be causing the issue but I'm not sure:

android-support-v4-googlemaps lib found at https://github.com/petedoyle/android-support-v4-googlemaps which allows me to embed a MapView in a Fragment (along with the ActionBarSherlock lib), ActionBarSherlock, Android-ViewPagerIndicator, AndroidBillingLibary (https://github.com/hpique/AndroidBillingLibrary) and a couple more.

This exception seems like a dependency issue and I'm not sure if it's related to how I'm using the above mentioned libs.

Here's the stack trace as well as the manifest file.

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.jerrellmardis.ridecta/com.jerrellmardis.ridecta.ui.StopTimesActivity}: java.lang.ClassNotFoundException: com.jerrellmardis.ridecta.ui.StopTimesActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1983)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.jerrellmardis.ridecta.ui.StopTimesActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
... 11 more

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.jerrellmardis.ridecta"
    android:installLocation="internalOnly"
    android:versionCode="11"
    android:versionName="1.0.2">
    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="16"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="com.android.vending.BILLING"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <application
        android:name=".RideCtaApplication"
        android:allowBackup="true"
        android:backupAgent=".backup.RideCtaBackupAgentHelper"
        android:hardwareAccelerated="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:logo="@drawable/logo">
        <uses-library android:name="com.google.android.maps"/>
        <activity
            android:name=".ui.HomeActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name"
            android:theme="@style/Theme.RideCta.LogoOnly">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.BusDirectionsActivity"
            android:label="@string/app_name"
            android:theme="@style/Theme.RideCta"/>
        <activity
            android:name=".ui.StopsActivity"
            android:label="@string/app_name"
            android:theme="@style/Theme.RideCta"/>
        <activity
            android:name=".ui.StopTimesActivity"
            android:label="@string/app_name"
            android:theme="@style/Theme.RideCta.Split"
            android:uiOptions="splitActionBarWhenNarrow"/>
        <activity
            android:name=".ui.TrainDirectionsActivity"
            android:label="@string/app_name"
            android:theme="@style/Theme.RideCta"/>
        <activity
            android:name=".ui.LiveMapActivity"
            android:label="@string/app_name"
            android:theme="@style/Theme.RideCta.Transparent"/>
        <activity
            android:name=".ui.ServiceAlertsActivity"
            android:label="@string/app_name"
            android:theme="@style/Theme.RideCta"/>
        <activity
            android:name=".ui.SearchActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/Theme.RideCta">
            <intent-filter>
                <action android:name="android.intent.action.SEARCH"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable"/>
        </activity>
        <activity
            android:name=".ui.PreferenceActivity"
            android:label="@string/app_name"
            android:theme="@style/Theme.Preference"/>
        <activity
            android:name=".ui.LegacyPreferenceActivity"
            android:label="@string/app_name"
            android:theme="@style/Theme.Preference"/>
        <activity
            android:name="com.google.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
        <receiver android:name=".receiver.ReminderAlarmReceiver"/>
        <receiver android:name=".receiver.ReminderBootReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>
        <receiver android:name="net.robotmedia.billing.BillingReceiver">
            <intent-filter>
                <action android:name="com.android.vending.billing.IN_APP_NOTIFY"/>
                <action android:name="com.android.vending.billing.RESPONSE_CODE"/>
                <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED"/>
            </intent-filter>
        </receiver>
        <service android:name=".service.ReminderService"/>
        <service android:name="net.robotmedia.billing.BillingService"/>
        <meta-data
            android:name="android.app.default_searchable"
            android:value=".ui.SearchActivity"/>
        <meta-data
            android:name="com.google.android.backup.api_key"
            android:value="<REMOVED>"/>
        <provider
            android:name=".provider.SearchProvider"
            android:authorities="com.jerrellmardis.ridecta.provider.SearchProvider"/>
    </application>
</manifest>
Reply all
Reply to author
Forward
0 new messages