2014-04-06 225 views
3

为了引导我的问题,我已经查看了所有类似的问题,我可以在StackOverflow上找到所有类似的问题,也可以在网络上找到没有成功的问题。我一直在开发使用真正的设备几个月没有问题。昨天我更新了之前与之合作过的Android Studio,版本为0.5.4。此更新要求我升级到Gradle版本0.9,因为构建系统显然有一些重大变化。自从升级我的IDE,当我尝试在设备上运行我的项目,我得到的运行控制台输出如下:安卓应用程序安装失败,错误:[INSTALL_FAILED_DEXOPT]

运行控制台输出

Waiting for device. 
Target device: samsung-sch_i605-42f7bff119a3bf69 
Uploading file 
    local path: C:\Users\student\Android studioProjects\DrunkModeAndroid\DrunkMode\build\apk\DrunkMode-debug-unaligned.apk 
    remote path: /data/local/tmp/com.launchfuture.drunk_mode 
Installing com.launchfuture.drunk_mode 
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.launchfuture.drunk_mode" 
pkg: /data/local/tmp/com.launchfuture.drunk_mode // this line is red 
Failure [INSTALL_FAILED_DEXOPT]      // this line is also red 

logcat的输出

04-06 14:44:00.066 8040-8040/? D/Finsky﹕ [1] WorkerTask.onPreExecute: Verification Requested for id = 21, data=file:///data/local/tmp/com.launchfuture.drunk_mode flags=114 fromVerificationActivity=false 
04-06 14:44:01.586 12740-12740/? W/dalvikvm﹕ DexOptZ: zip archive '/data/app/com.launchfuture.drunk_mode-1.apk' does not include classes.dex 
04-06 14:44:01.591 2001-2001/? W/installd﹕ DexInv: --- END '/data/app/com.launchfuture.drunk_mode-1.apk' --- status=0xff00, process failed 
04-06 14:44:01.591 2001-2001/? E/installd﹕ dexopt failed on '/data/dalvik-cache/[email protected]@[email protected]' res = 65280 
04-06 14:44:01.591 2410-2621/? W/PackageManager﹕ Package couldn't be installed in /data/app/com.launchfuture.drunk_mode-1.apk 

build.gradle

buildscript { 
    repositories { 
     mavenCentral() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:0.9.+' 
    } 
} 
apply plugin: 'android' 

repositories { 
    mavenCentral() 
} 

dependencies { 
    compile 'com.google.code.gson:gson:2.2.+' 
    compile files('libs/Parse-1.4.0.jar') 
    compile files('libs/GoogleAnalyticsServicesAndroid_3.01/libGoogleAnalyticsServices.jar') 
    compile 'com.google.android.gms:play-services:4.1.32' 
} 

android { 
    compileSdkVersion 19 
    buildToolsVersion '19.0.0' 

    defaultConfig { 
     minSdkVersion 13 
     targetSdkVersion 19 
    } 
} 

我的android设备是固定的,因此我可以查看指定位置的文件系统。值得注意的是,对[email protected]@[email protected]的引用不存在于/data/dalvik-cache/目录中。你们有没有经验处理这个问题?

+0

'/ data/dalvik-cache'上有多少可用空间? –

+0

尝试将'0.9。+'更改为'0.9.0'。插件的0.9.1和0.9.2有一些问题。我不记得他们有这些症状,但值得一试,因为这是一个字符的变化。 :-) – CommonsWare

+0

@EugenRieck我不熟悉如何确定特定于该目录的可用空间,但我的设备上的内部存储器仍具有3.6GB的可用空间。 – Philip

回答

1

请您清空/ data/dalvik-cache的内容并重新引导(或从恢复中清除dalvik缓存),以便重建它?

+0

当你说清空/ data/dalvik-cache的内容时,你是说我应该删除每个应用程序的该目录中的所有内容? – Philip

+0

好吧,不要这样做,启动恢复并从恢复中清除dalvik缓存。这个过程不会很麻烦。 – CodeWalker

+0

@菲利普:你有没有尝试法登的建议?您是否使用zip实用程序为classes.dex检查了APK? – CodeWalker

0

在一个有根的手机上,安装lucky patcher然后通过幸运补丁程序去选项建立和安装,在想要安装的SD卡上转到想要的SD卡,点击它并选择安装为系统应用程序...进程重启后...它可以在移动系统应用程序空间的成本下工作。

相关问题