爲了引導我的問題,我已經查看了所有類似的問題,我可以在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