无法在模拟器上启动测试应用程序

时间:2012-12-24 14:24:42

标签: android emulation avd

我对AVD有这些配置:

enter image description here

并安装了最小的SDK API 10

enter image description here

,应用程序清单是:

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

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="16" />

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

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

这只是一个刚刚创建的测试应用程序。

因此,当我运行应用程序时,它会尝试在上面的AVD上运行,并在模拟器上提供这些错误:

The application Package Access Helper(process.com.android.defcontainer) has stopped unexpectedly. Please try again

还有更多这样的错误说:

sdksetup停止工作

时钟已停止工作

.... ....

logcat的:

12-24 14:25:12.089: I/dalvikvm(405): Unable to open or create cache for /system/app/Phone.apk (/data/dalvik-cache/system@app@Phone.apk@classes.dex)
12-24 14:25:12.169: D/AndroidRuntime(405): Shutting down VM
12-24 14:25:12.169: W/dalvikvm(405): threadid=1: thread exiting with uncaught exception (group=0x40015560)
12-24 14:25:12.189: E/AndroidRuntime(405): FATAL EXCEPTION: main
12-24 14:25:12.189: E/AndroidRuntime(405): java.lang.RuntimeException: Unable to instantiate application com.android.phone.PhoneApp: java.lang.ClassNotFoundException: com.android.phone.PhoneApp in loader dalvik.system.PathClassLoader[/system/app/Phone.apk]
12-24 14:25:12.189: E/AndroidRuntime(405):  at android.app.LoadedApk.makeApplication(LoadedApk.java:466)
12-24 14:25:12.189: E/AndroidRuntime(405):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3260)
12-24 14:25:12.189: E/AndroidRuntime(405):  at android.app.ActivityThread.access$2200(ActivityThread.java:117)
12-24 14:25:12.189: E/AndroidRuntime(405):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:969)
12-24 14:25:12.189: E/AndroidRuntime(405):  at android.os.Handler.dispatchMessage(Handler.java:99)
12-24 14:25:12.189: E/AndroidRuntime(405):  at android.os.Looper.loop(Looper.java:123)
12-24 14:25:12.189: E/AndroidRuntime(405):  at android.app.ActivityThread.main(ActivityThread.java:3683)
12-24 14:25:12.189: E/AndroidRuntime(405):  at java.lang.reflect.Method.invokeNative(Native Method)
12-24 14:25:12.189: E/AndroidRuntime(405):  at java.lang.reflect.Method.invoke(Method.java:507)
12-24 14:25:12.189: E/AndroidRuntime(405):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-24 14:25:12.189: E/AndroidRuntime(405):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-24 14:25:12.189: E/AndroidRuntime(405):  at dalvik.system.NativeStart.main(Native Method)
12-24 14:25:12.189: E/AndroidRuntime(405): Caused by: java.lang.ClassNotFoundException: com.android.phone.PhoneApp in loader dalvik.system.PathClassLoader[/system/app/Phone.apk]
12-24 14:25:12.189: E/AndroidRuntime(405):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
12-24 14:25:12.189: E/AndroidRuntime(405):  at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
12-24 14:25:12.189: E/AndroidRuntime(405):  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-24 14:25:12.189: E/AndroidRuntime(405):  at android.app.Instrumentation.newApplication(Instrumentation.java:942)
12-24 14:25:12.189: E/AndroidRuntime(405):  at android.app.LoadedApk.makeApplication(LoadedApk.java:461)
12-24 14:25:12.189: E/AndroidRuntime(405):  ... 11 more
12-24 14:25:12.289: W/ActivityManager(70): Process com.android.phone has crashed too many times: killing!
12-24 14:25:12.330: W/DropBoxManagerService(70): Dropping: system_app_crash (1630 > 0 bytes)
12-24 14:25:12.509: W/ActivityManager(70): Activity pause timeout for HistoryRecord{408f4388 com.android.sdksetup/.DefaultActivity}
12-24 14:25:12.729: I/ActivityManager(70): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.sdksetup/.DefaultActivity } from pid 0
12-24 14:25:13.079: D/dalvikvm(405): GC_CONCURRENT freed 480K, 54% free 2696K/5831K, external 716K/1038K, paused 6ms+57ms
12-24 14:25:13.962: W/ActivityManager(70): Launch timeout has expired, giving up wake lock!
12-24 14:25:21.707: W/ActivityManager(70): Activity idle timeout for HistoryRecord{408f4388 com.android.sdksetup/.DefaultActivity}
12-24 14:25:22.843: W/ActivityManager(70): Activity idle timeout for HistoryRecord{406d47a0 com.android.sdksetup/.DefaultActivity}
12-24 14:25:27.899: D/skia(70): purging 45K from font cache [6 entries]
12-24 14:25:28.029: D/dalvikvm(70): GC_EXPLICIT freed 415K, 56% free 4455K/9991K, external 1492K/1828K, paused 135ms
12-24 14:25:31.741: W/ActivityManager(70): Activity destroy timeout for HistoryRecord{408f4388 com.android.sdksetup/.DefaultActivity}
12-24 14:25:33.209: D/dalvikvm(296): GC_EXPLICIT freed 1K, 55% free 2583K/5703K, external 716K/1038K, paused 132ms
: E/(): Device disconnected

如何解决这个问题?

谢谢

0 个答案:

没有答案