运行时异常无法在模拟器中运行app

时间:2014-01-25 03:51:52

标签: android eclipse

我无法在模拟器中运行我的应用程序。

我的androidManifest.xml文件是

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ch.adiuvaris.enigma"android:versionCode="1" android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application android:icon="@drawable/icon" android:label="@string/appName" >
    <activity   android:label="@string/appName" android:name=".EnigmaPuzzle" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />
         <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:label="Enigma Settings android:name=".GamePrefs" >
    </activity>
    <activity android:label="Enigma Help" android:name=".GameHelp" >
    </activity>
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true">
    </supports-screens>
    </application>
    </manifest>'}

我在logcat中遇到以下错误

  

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):致命异常:主

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):java.lang.RuntimeException:无法实例化活动ComponentInfo {com.example.engime / com.example.engime.EnigmaPuzzle}:java.lang。 ClassNotFoundException:com.example.engime.EnigmaPuzzle in loader dalvik.system.PathClassLoader [/data/app/com.example.engime-1.apk]

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):在android.app.ActivityThread.access $ 1500(ActivityThread.java:117)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:931)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):在android.os.Handler.dispatchMessage(Handler.java:99)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):在android.os.Looper.loop(Looper.java:123)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):在android.app.ActivityThread.main   (ActivityThread.java:3683)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):at java.lang.reflect.Method.invokeNative(Native Method)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):at java.lang.reflect.Method.invoke(Method.java:507)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):atcom.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:839)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):at dalvik.system.NativeStart.main(Native Method)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):引起:java.lang.ClassNotFoundException:com.example.engime.EnigmaPuzzle in loader dalvik.system.PathClassLoader [/ data / app / com。 example.engime-1.apk]

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):at java.lang.ClassLoader.loadClass(ClassLoader.java:551)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):在android.app.Instrumentation.newActivity(Instrumentation.java:1021)

     

01-24 22:42:14.741:ERROR / AndroidRuntime(1224):at android.app.ActivityThread.performLaunchActivity

1 个答案:

答案 0 :(得分:0)

如果您正在使用Eclipse,请尝试清理项目。您的清单尚未刷新,这就是为什么它抱怨com.example.enigme中找不到的类