0

我有一个三星 Galaxy S3,并且我已经构建了股票 AOSP ICS Launcher2 应用程序。然后我尝试通过“adb install”安装 apk,但这样做时出现“INSTALL_FAILED_DEXOPT”错误。设备logcat如下:

D/AndroidRuntime( 5431): 
D/AndroidRuntime( 5431): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 5431): CheckJNI is OFF
D/AndroidRuntime( 5431): setted country_code = France
D/AndroidRuntime( 5431): setted countryiso_code = FR
D/AndroidRuntime( 5431): setted sales_code = XEF
D/AndroidRuntime( 5431): readGMSProperty: start
D/AndroidRuntime( 5431): readGMSProperty: already setted!!
D/AndroidRuntime( 5431): readGMSProperty: end
D/LibQmg_native( 5431): register_android_app_LibQmg
D/AndroidRuntime( 5431): Calling main entry com.android.commands.pm.Pm
W/PackageManager( 2093): verifying app can be installed or not
I/ApplicationPolicy( 2093): isApplicationInstallationEnabled
D/dalvikvm( 2093): GC_CONCURRENT freed 7885K, 31% free 32346K/46791K, paused 2ms+6ms
D/dalvikvm( 2093): GC_CONCURRENT freed 1834K, 31% free 32555K/46791K, paused 3ms+5ms
E/PackageManager( 2093): Package XXX.XXXXXXX.XXXXXXXX has mismatched uid: 10130 on disk, 10131 in settings
I/PackageManager( 2093): Running dexopt on: XXX.XXXXXXX.XXXXXXXX
I/PackageManager( 2093): Linking native library dir for |XXXX|XXX|XXXXXXXXXXXXXXXXXXXXXX.XXX
W/dalvikvm( 5442): DexOptZ: zip archive '/data/app/com.android.launcher-1.apk' does not include classes.dex
W/installd( 1907): DexInv: --- END '/data/app/com.android.launcher-1.apk' --- status=0xff00, process failed
E/installd( 1907): dexopt failed on '/data/dalvik-cache/data@app@com.android.launcher-1.apk@classes.dex' res = 65280
W/PackageManager( 2093): Package couldn't be installed in /data/app/com.android.launcher-1.apk

我做错了什么?

谢谢。

4

1 回答 1

0

您需要增加 Android 模拟器的内存容量,有两种方法:

1-右键单击Android项目的根目录,转到“运行方式”,然后转到“运行配置...”,在左侧树中找到“Android应用程序”节点,然后选择您的项目并转到“窗口右侧的“目标”选项卡向下查找“附加仿真器命令行选项”字段(有时您需要使窗口变大),最后在此处粘贴“-partition-size 1024”。单击应用,然后单击运行以使用您的模拟器。

2-转到Eclipse的首选项,然后选择“启动”在“默认模拟器选项”字段中添加“-partition-size 1024”,然后单击“应用”并像往常一样使用您的模拟器。

于 2012-12-07T08:18:50.733 回答