DEBUG/dalvikvm(4808): DexOpt: 'Ljunit/framework/TestSuite$1;' has an earlier definition; blocking out
11-06 14:30:10.973: WARN/dalvikvm(4808): Invalid file flags in class Ljunit/runner/Sorter$Swapper;: 0209
11-06 14:30:10.973: null/libc(4808): Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1), thread 4808 (dexopt)
我需要禁用即时运行来解决这个问题。要禁用OS X上的即时运行,请转到Android工作室 > 首选项 > 构建、执行、部署 > 即时运行,然后从Enable Instant Run to hot swap code/resource changes on deploy (default enabled)中删除勾号。
defaultConfig {
applicationId "software.nhut.personalutilitiesforlife"
minSdkVersion 16
targetSdkVersion 22//17==========================> set this number less then or equal to the version of Android OS on devices might help
versionCode 5
versionName "1.26"
// Enabling multidex support.
multiDexEnabled true
}