我使用Multidex來解決65535.I已經應用Android Multidex指南。 https://developer.android.com/tools/building/multidex.html 但是對於任務':堆棧映射幀中的未知驗證類型[73]',執行失敗。 這個類在Android庫中,我不能修改它。它的jar可能是proguard。 我該如何解決這個問題?Android Studio Multidex失敗:堆棧映射幀中的未知驗證類型[73]
失敗:生成失敗,出現異常。
任務':XXXXX:transformClassesWithMultidexlistForDebug'的執行失敗。
java.io.IOException:無法讀取[\ build \ intermediates \ transforms \ jarMerging \ debug \ jars \ 1 \ 1f \ combined.jar](無法處理類[XXXXX.class]((未知驗證型[73]在棧圖幀))
這是我的build.gradle:
應用插件: 'com.android.application'
依賴性{ 編譯「融爲一體。 android.support:multidex:1.0.0'
compile fileTree(include: '*.jar', dir: 'libs')
compile project(':Android_Libproject')
compile files('libs/ant-1.9.5.jar')
compile files('libs/ant-launcher-1.9.5.jar')
compile files('libs/commons-io-2.4.jar')
compile files('libs/dom4j-1.6.1.jar')
compile files('libs/htmllexer.jar')
...........
}
的Android { compileSdkVersion 21 buildToolsVersion 「21.1.2」
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
defaultConfig {
minSdkVersion 19
targetSdkVersion 21
multiDexEnabled true
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src/main/java','src']
resources.srcDirs = ['src/main/java','src']
aidl.srcDirs = ['src/main/java','src']
renderscript.srcDirs = ['src/main/java','src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
是的,我已經做了這些,但也有同樣的問題 – yangrenhao