java.lang.RuntimeException:无法实例化活动ComponentInfo - Android

时间:2014-08-31 20:56:57

标签: android

我真的很困惑。在我尝试将我的软件包从android.app更改为android.support.v4后,我的应用程序崩溃并抛出以下异常:

    08-31 20:45:18.652: E/AndroidRuntime(1429): FATAL EXCEPTION: main
08-31 20:45:18.652: E/AndroidRuntime(1429): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.k2evil.porschejournal/com.k2evil.porschejournal.FirstScreen}: java.lang.ClassNotFoundException: Didn't find class "com.k2evil.porschejournal.FirstScreen" on path: DexPathList[[zip file "/data/app/com.k2evil.porschejournal-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.k2evil.porschejournal-2, /system/lib]]
08-31 20:45:18.652: E/AndroidRuntime(1429):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2137)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at android.os.Looper.loop(Looper.java:137)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at android.app.ActivityThread.main(ActivityThread.java:5103)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at java.lang.reflect.Method.invokeNative(Native Method)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at java.lang.reflect.Method.invoke(Method.java:525)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at dalvik.system.NativeStart.main(Native Method)
08-31 20:45:18.652: E/AndroidRuntime(1429): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.k2evil.porschejournal.FirstScreen" on path: DexPathList[[zip file "/data/app/com.k2evil.porschejournal-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.k2evil.porschejournal-2, /system/lib]]
08-31 20:45:18.652: E/AndroidRuntime(1429):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
08-31 20:45:18.652: E/AndroidRuntime(1429):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
08-31 20:45:18.652: E/AndroidRuntime(1429):     ... 11 more

这是我的机器人清单:

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

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

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

</manifest>

我尝试了清理项目,并重命名了应用包名称。但它没有用。

1 个答案:

答案 0 :(得分:0)

这只是一个日食错误......关闭并重新开启日食:)