Android - java.lang.ClassNotFoundException:在路径上找不到类“...”:/ data / app /

时间:2013-12-09 19:46:11

标签: android eclipse apk

几个小时前,我完成了我的大项目,虽然我需要在所有课程中手动重命名项目包名称。在一切正常之前,一切正常,但是现在,当我更改所有包名时,我在LogCat中遇到了这些错误:

12-09 21:40:48.793: D/AndroidRuntime(11168): Shutting down VM
12-09 21:40:48.793: W/dalvikvm(11168): threadid=1: thread exiting with uncaught exception (group=0x41824898)
12-09 21:40:48.803: E/AndroidRuntime(11168): FATAL EXCEPTION: main
12-09 21:40:48.803: E/AndroidRuntime(11168): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.diamondappz.linksmiausikalediniaisveikinimai/com.diamondappz.linksmiausikalediniaisveikinimai.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.diamondappz.linksmiausikalediniaisveikinimai.MainActivity" on path: /data/app/com.diamondappz.linksmiausikalediniaisveikinimai-1.apk
12-09 21:40:48.803: E/AndroidRuntime(11168):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2229)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at android.app.ActivityThread.access$700(ActivityThread.java:165)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at android.os.Looper.loop(Looper.java:137)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at android.app.ActivityThread.main(ActivityThread.java:5450)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at java.lang.reflect.Method.invokeNative(Native Method)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at java.lang.reflect.Method.invoke(Method.java:525)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at dalvik.system.NativeStart.main(Native Method)
12-09 21:40:48.803: E/AndroidRuntime(11168): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.diamondappz.linksmiausikalediniaisveikinimai.MainActivity" on path: /data/app/com.diamondappz.linksmiausikalediniaisveikinimai-1.apk
12-09 21:40:48.803: E/AndroidRuntime(11168):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
12-09 21:40:48.803: E/AndroidRuntime(11168):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2220)
12-09 21:40:48.803: E/AndroidRuntime(11168):    ... 11 more

我的应用程序崩溃,我什么也做不了。我尝试使用谷歌搜索并在StackOverflow上搜索类似的问题,我找到了几个解决方案,但没有任何工作。 也许有人知道在这种情况下我该怎么做?对于这样的错误,有时候我无法做任何让它工作的事情,这是非常令人沮丧的。非常感谢您的回复。

编辑:这是我的清单:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.diamondappz.linksmiausikalediniaisveikinimai"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.android.alarm.permission.SET_ALARM" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/Theme.CustomDark" >
        <receiver
            android:name="funny.topic.free.jokes.Widget"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/widget_generic" />
        </receiver>

        <service
            android:name="funny.topic.free.jokes.AlarmService_Service"
            android:process=":remote" />

        <activity
            android:name=".MainActivity"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".activity.AuthorList"
            android:screenOrientation="portrait" >
>

        </activity>
        <activity
            android:name=".activity.AuthorQuoteList"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activity.QuoteView"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activity.QuoteList"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activity.FavouristList"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activity.CategoryList"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activity.FilterList"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activity.CategoryQuoteList"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activity.SearchActivity"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activity.HelpActivity"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activity.SettingActivity"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.google.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
    </application>

</manifest>

0 个答案:

没有答案