user1125258
user1125258

Reputation:

How to fix the ClassNotFoundException generated error

I just copied one of my projects to a new project space, and when I run the App from the newly created project, it crashes and logcat generates the below errors. I checked themanifest file and it seemed to that there is nothing wrong with it. Please help me to find the errors causing the crash.

Updated Manifest file :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.meetingpointlocator_03test00"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="19" />

<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.meetingpointlocator_03test00.Intro"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name="com.example.meetingpointlocator_03test00.MainMenuActivity"
        android:label="@string/title_activity_mpl" >
    </activity>

    <activity
        android:name="com.example.meetingpointlocator_03test00.AddNewLocationActivity"
        android:label="@string/title_activity_add_new_location" >
    </activity>

    <activity
        android:name="com.example.meetingpointlocator_03test00.MeetingPointFix"
        android:label="@string/title_activity_meeting_point_fix" >
    </activity>

    <activity
        android:name="com.example.meetingpointlocator_03test00.AHActivity"
        android:label="@string/title_activity_navigate"
        android:screenOrientation="landscape"
        android:theme="@style/Theme.AppCompat.Light"
        android:configChanges="keyboardHidden|orientation">
    </activity>
</application>

Updated Logca:

06-07 17:50:49.056: E/AndroidRuntime(31571): FATAL EXCEPTION: main
06-07 17:50:49.056: E/AndroidRuntime(31571): Process:   
com.example.meetingpointlocator_03test00, PID: 31571
06-07 17:50:49.056: E/AndroidRuntime(31571): java.lang.RuntimeException: Unable to 
instantiate activity 


ComponentInfo{com.example.meetingpointlocator_03test00/com.example.meetingpointlocator_03test00.Intro}: java.lang.ClassNotFoundException: Didn't find class "com.example.meetingpointlocator_03test00.Intro" on path: DexPathList[[zip file "/data/app/com.example.meetingpointlocator_03test00-3.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.meetingpointlocator_03test00-3, /vendor/lib, /system/lib]]
06-07 17:50:49.056: E/AndroidRuntime(31571):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2208)
06-07 17:50:49.056: E/AndroidRuntime(31571):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2340)

Upvotes: 1

Views: 83

Answers (2)

Hamad
Hamad

Reputation: 5152

com.example.meetingpointlocator_03Test00.Intro

it looks like, there is some kind of spelling mistake by launching intro app, in your manifest file, the activity with package name is com.example.meetingpointlocator_03test00.Intro and in exception the activity with package name is: com.example.meetingpointlocator_03Test00.Intro see the T is capital in exception Test00 and in manifest is test00. hope that solves your problem!

Upvotes: 1

user1645747
user1645747

Reputation: 11

It seems that you are calling a library that is not in your buildpath. What is this class "com.example.meetingpointlocator_03Test00.Intro"? As far as I know a class in java should be a *.java

Upvotes: 1

Related Questions