test123123
test123123

Reputation: 921

ClassNotFoundException after package renaming

hy!

Exception:

10-05 15:36:36.609: ERROR/AndroidRuntime(237): Caused by: java.lang.ClassNotFoundException: com.korn.gpv.Main in loader dalvik.system.PathClassLoader@44e836b8

after changing the package name.

Please help

new package: com.android.korn.gpv

Upvotes: 2

Views: 1361

Answers (3)

Houcine
Houcine

Reputation: 24181

did you changed it on the manifest file ?? like this :

<manifest xmlns:android="schemas.android.com/apk/res/android" package="com.android.korn.gpv" >

Upvotes: 2

nikki
nikki

Reputation: 3228

When you changed package name also check within the <manifest> tag, that the package will be same as your new package name.

<manifest xmlns:android="schemas.android.com/apk/res/android" 
      package="com.android.korn.gpv" >

Upvotes: 0

curiouscat
curiouscat

Reputation: 11

If changing the package name in <manifest> tag does not work, try changing or adding the name of the activity (Main) to the manifest file as follows.

<activity android:name="com.android.korn.gpv.Main" android:label="@string/app_name">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

If that doesn't work either, make sure that any other files in your project does not refer to com.korn.gpv.Main instead of com.android.korn.gpv.Main.

Upvotes: 2

Related Questions