为了引导我的问题,我已经查看了所有类似的问题,我可以在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/
目录中。你们有没有经验处理这个问题?
'/ data/dalvik-cache'上有多少可用空间? –
尝试将'0.9。+'更改为'0.9.0'。插件的0.9.1和0.9.2有一些问题。我不记得他们有这些症状,但值得一试,因为这是一个字符的变化。 :-) – CommonsWare
@EugenRieck我不熟悉如何确定特定于该目录的可用空间,但我的设备上的内部存储器仍具有3.6GB的可用空间。 – Philip