问题描述
我已将项目从Android Studio 2.3.3迁移到Android Studio 3.0 Beta 2,现在我的项目无法运行.
I have migrated my project from Android Studio 2.3.3 to Android Studio 3.0 Beta 2 and now my project won't run.
我在控制台中收到以下消息:
I get the following message in the console:
错误:任务':app:transformClassesWithDesugarForDebug'的执行失败.
Error:Execution failed for task ':app:transformClassesWithDesugarForDebug'.
要运行它,我缺少什么了吗?
Is there anything I'm missing to make it run?
我的gradle文件如下:
My gradle file is as follows:
buildscript {
repositories {
mavenCentral();
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.22.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "com.newrelic.agent.android:agent-gradle-plugin:5.9.0"
}
}
apply plugin: 'com.android.application'
//apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
apply plugin: 'newrelic'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "http://dl.bintray.com/glomadrian/maven" }
maven {
url "http://nexus.radioafricaplatforms.com/repository/radio-africa-group"
credentials {
username "${project.getProperties().ragNexusUsername}"
password "${project.getProperties().ragNexusPassword}"
}
}
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.radioafrica.music"
minSdkVersion 19
targetSdkVersion 25
renderscriptTargetApi 20
renderscriptSupportModeEnabled true
versionCode 74
versionName "0.9.9"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
multiDexKeepProguard file("proguard.multidex.config")
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// retrolambda {
// jvmArgs '-noverify'
// }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('io.fabric.sdk.android:fabric:1.3.16@aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true;
}
compile 'com.newrelic.agent.android:android-agent:5.9.0'
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:palette-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'jp.wasabeef:glide-transformations:2.0.1'
compile 'com.google.android.exoplayer:exoplayer:r2.3.1'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.google.firebase:firebase-core:11.2.0'
compile 'io.realm:android-adapters:2.1.0'
compile 'org.parceler:parceler-api:1.1.6'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.radioafrica.sdk:rag-sdk:0.0.59-SNAPSHOT'
compile 'com.andrognito.kerningview:kerningview:1.0.0'
compile 'com.flurry.android:analytics:6.4.2'
compile 'com.amazonaws:aws-android-sdk-core:2.3.9'
compile 'com.amazonaws:aws-android-sdk-pinpoint:2.3.9'
compile 'com.amazonaws:aws-android-sdk-sns:2.3.9'
compile 'com.google.android.gms:play-services-gcm:11.0.4'
compile 'com.wdullaer:materialdatetimepicker:3.1.3'
testCompile 'junit:junit:4.12'
annotationProcessor 'org.parceler:parceler:1.1.5'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile "com.mixpanel.android:mixpanel-android:5.0.2"
compile 'com.mani:ThinDownloadManager:1.3.0'
compile 'com.google.android:flexbox:0.3.0-alpha3'
compile 'com.airbnb:deeplinkdispatch:3.1.0'
annotationProcessor 'com.airbnb:deeplinkdispatch-processor:3.1.0'
// compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.4-2"
}
apply plugin: 'com.google.gms.google-services'
推荐答案
com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException:执行时出错 具有主类的Java进程 带有参数的com.google.devtools.build.android.desugar.Desugar
com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments
打开您的并在下面使用
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
然后 Clean-Rebuild-Run
.
Then Clean-Rebuild-Run
.
这篇关于Android Studio 3.0 Beta 2上的任务app:transformClassesWithDesugarForDebug错误执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!