下面是我的build.gradle的一個機器人工作室項目內容:Andrioid工作室 - 錯誤字節碼轉換到DEX,原因:地塞米松無法解析版本52字節代碼
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.nariman.myapplication"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'net.time4j:time4j-calendar:4.20'
compile 'net.time4j:time4j-olson:4.0'
testCompile 'junit:junit:4.12'
}
鑽我得到下面的錯誤:您可以看到,我已經嘗試添加targetCompatibility和sourceCompatibility,但問題仍然存在。
我搜索,似乎有類似的問題報告,但似乎現在還沒有找到解決方案。
複製這個[文章](http://stackoverflow.com/questions/ 37020413/android-dex-can-parse-version-52-byte-code) –
@張翔正如我在問題中提到的那樣,它有一個類似的問題,但我使用的依賴關係是不同的,並且該帖子的解決方案也不適用我。 – user3033921