Android Studio中如何修复'Unsupported class file major version 64'错误
构建Android项目时遇到
Unsupported class file major version 64错误求助 构建、清理项目或重试操作时,持续遇到Unsupported class file major version 64错误,目前未找到有效解决办法,以下是项目配置信息:
项目配置信息
gradle-wrapper.properties
#Wed Oct 21 11:43:07 PKT 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
根目录build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { mavenCentral() google() } dependencies { classpath 'com.android.tools.build:gradle:8.1.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { mavenCentral() google() } } tasks.register('clean', Delete) { delete rootProject.buildDir }
app模块build.gradle
apply plugin: 'com.android.application' android { compileSdkVersion 33 buildToolsVersion '28.0.2' defaultConfig { applicationId "com.thumbsol.accuratemobileassetsmanagament" minSdkVersion 19 targetSdkVersion 33 versionCode 1 versionName "1.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' vectorDrawables.useSupportLibrary = true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } lintOptions { checkReleaseBuilds false } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) androidTestImplementation('androidx.test.espresso:espresso-core:3.5.1', { exclude group: 'com.android.support', module: 'support-annotations' }) implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.10.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'com.jakewharton:butterknife:10.2.3' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.vectordrawable:vectordrawable:1.1.0' implementation 'com.squareup.picasso:picasso:2.71828' implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1' testImplementation 'junit:junit:4.13.2' annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3' implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1' implementation 'com.github.luongvo:GmailBackground:2.0.2' }
项目结构

已尝试操作
- 试过Stack Overflow上的相关解决方案,但未解决问题。
内容的提问来源于stack exchange,提问作者Moeez
相关产品推荐
相关产品推荐

