任务应用程序执行失败:Android Studio 3.0 Beta 2 上的transformClassesWithDesugarForDebug 错误

Posted

技术标签:

【中文标题】任务应用程序执行失败:Android Studio 3.0 Beta 2 上的transformClassesWithDesugarForDebug 错误【英文标题】:Execution failed for task app:transformClassesWithDesugarForDebug error on Android Studio 3.0 Beta 2 【发布时间】:2018-01-31 16:51:27 【问题描述】:

我已将我的项目从 android Studio 2.3.3 迁移到 Android Studio 3.0 Beta 2,现在我的项目无法运行。

我在控制台中收到以下消息:

错误:任务 ':app:transformClassesWithDesugarForDebug' 执行失败。

com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: 使用主类 com.google.devtools.build.android 执行 java 进程时出错.desugar.Desugar 带参数 --input /Users/pq/.gradle/caches/transforms-1/files-1.1/kerningview-1.0.0.aar/ac0f6c2213c36fdc32039f51a20bac89/jars/classes.jar --output /Users/pq /Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/38.jar --input /Users/pq/.gradle/caches/transforms-1/files-1.1/support-core-utils-25.3。 1.aar/56e47cfd160ed843d4216890e0682023/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/60.jar --input /Users/pq/.gradle/ caches/transforms-1/files-1.1/firebase-analytics-11.2.0.aar/61d81afc363bc8c865c16245e72c4d3e/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/ debug/52.jar --input /Users/pq/.gradle/caches/modules-2/files-2。 1/com.google.code.gson/gson/2.8.1/2a8e0aa38a2e21cb39e2f5a7d6704cbdc941da0/gson-2.8.1.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/ 25.jar --input /Users/pq/.gradle/caches/transforms-1/files-1.1/firebase-iid-11.2.0.aar/9651e811bb6602fd5600e13c0f77df9f/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/54.jar --input /Users/pq/.gradle/caches/transforms-1/files-1.1/mixpanel-android-5.0.2.aar/ c5e3ba28099100a23d773854c2a084a0/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/41.jar --input /Users/pq/.gradle/caches/transforms- 1/files-1.1/support-media-compat-25.3.1.aar/0ce9f8c2bae8fd1a0c62c91b27e5dffc/jars/classes.jar --输出/Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/ 66.jar --输入/Users/pq/.gradle/caches/transforms-1/files-1.1/firebase-common-11.2.0.aar/1331f5675014cd64782fd82fe1b a00a6/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/55.jar --input /Users/pq/.gradle/caches/transforms- 1/files-1.1/support-v4-25.3.1.aar/0b7bcfd4905c5ac50204aa5421a48426/jars/classes.jar --输出/Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/58。 jar --input /Users/pq/.gradle/caches/transforms-1/files-1.1/support-core-ui-25.3.1.aar/2b962af6d4052d7dcf1fe7b4fecffac6/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/67.jar --input /Users/pq/.gradle/caches/transforms-1/files-1.1/play-services-iid-11.0.4。 aar/fe5d1cfe286ef2ff895cb2a8243612ed/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/49.jar --input /Users/pq/.gradle/caches/ transforms-1/files-1.1/play-services-auth-11.0.4.aar/1dc6d7b9b9e417c0c02beb44f1f6074d/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/a pp/build/intermediates/transforms/desugar/debug/48.jar --input /Users/pq/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.3.0/bcacde6a8ccedcc56c127403d26b76072fe6214d/ retrofit-2.3.0.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/71.jar --input /Users/pq/.gradle/caches/transforms- 1/files-1.1/library-1.0.5.aar/b8951b6a291a5e6dcb10ad712260f63a/jars/classes.jar --输出/Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/31.jar - -input /Users/pq/.gradle/caches/transforms-1/files-1.1/rxandroid-1.2.1.aar/5b18b7f07a2bab8a4a872f6e339e94a7/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/app/ build/intermediates/transforms/desugar/debug/74.jar --input /Users/pq/.gradle/caches/transforms-1/files-1.1/crashlytics-core-2.3.16.aar/d223925dea9b1eb279b3c2c1e6c1459c/jars/classes。 jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/transforms/desugar/debug/6.jar --input /Us ers/pq/.gradle/caches/transforms-1/files-1.1/crashlytics-2.6.7.aar/547e70ef2f064a53ac01c4cfc61ec3ba/jars/classes.jar --output /Users/pq/Radio Africa/NakedGroove/app/build/intermediates /transforms/desugar/debug/4.jar --classpath_entry /Users/pq/Library/Android/sdk/build-tools/25.0.3/renderscript/lib/renderscript-v8.jar --classpath_entry /Users/pq/。 gradle/caches/transforms-1/files-1.1/rag-sdk-0.0.59-SNAPSHOT.aar/96c4cb4a5e44efcc26c2770128372010/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files- 1.1/realm-android-library-3.5.0.aar/66a749eaa9802bd2a98835757e92bac1/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/io.realm/realm-annotations/ 3.5.0/1e4b144dd28b139ae890ce2868979b12e1f2d7c7/realm-annotations-3.5.0.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/crashlytics-2.6.7.aar/547e70ef2f064a53acs/classescf4ecbajar/classpath_entry jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/beta-1.2.4.aar/6d4e ef69ef44bed79d4fdd2247bdaae5/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/crashlytics-core-2.3.16.aar/d223925dea9b1eb279b3c2c1e6c1459c/jars/classes.jar --classpath_entry /Users /pq/.gradle/caches/transforms-1/files-1.1/answers-1.3.12.aar/89897d5535ea1b02a80e118a43258084/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files- 1.1/fabric-1.3.16.aar/b226cc1baee0201e5da67c74787af982/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.newrelic.agent.android/android-agent/ 5.9.0/723eac3b1ab0217e2cb04831ada6dcdb6182ea35/android-agent-5.9.0.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/multidex-1.0.2.aar/ab83d031af915067cc7a0c9ca075cb05/classes.jars jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/facebook-android-sdk-4.19.0.aar/7d4a78fd6e6d7cfc85dee6f3475508af/jars/classes.jar --classpath_entry /Users/pq/。 gradle/caches/transforms-1/files-1.1/cardview-v7-25.3。 1.aar/0502c0da0d735bd478f1167a4a6f704f/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/flexbox-0.3.0-alpha3.aar/39dfb9239b492f7099409b4793e918d6/jars/jars/ -classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/materialdatetimepicker-3.1.3.aar/0ac5fa2cafae94963c888a03c2066d62/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms- 1/files-1.1/account-kit-sdk-4.13.2.aar/968ce87dabb0a8f5e2e9d45f071da1fd/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/design-25.3。 1.aar/7d60cd51bf1b35f70790140c93c133d1/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/recyclerview-v7-25.3.1.aar/66d87d379811b0222f7d29e88d7ee4b4/classes.jar/ -classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/palette-v7-25.3.1.aar/886a5a593100fca9ff7d285cebea9c43/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/ transforms-1/files-1.1/play-services-location-11.0.4。 aar/d6ab8ba223c68ddb65470db31d7257e4/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.amazonaws/aws-android-sdk-pinpoint/2.3.9/2411e971f75652b978b550b7a8021afs-d84 android-sdk-pinpoint-2.3.9.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.amazonaws/aws-android-sdk-sns/2.3.9/4a9c68c102c695a24eb9bba09f8a472e576614e5/ aws-android-sdk-sns-2.3.9.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.amazonaws/aws-android-sdk-sqs/2.3.9/ a1278f3266ff8c936dd0de6485de8029a900091f/aws-android-sdk-sqs-2.3.9.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.amazonaws/aws-android-sdk-core/2.3。 9/2fa9ee0e95329912656c8ccd98991b195a3ea539/aws-android-sdk-core-2.3.9.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/converter-gson/2.3。 0/9e09011e9767bb76b5e27c9b8223476b93b14631/converter-gson-2.3.0.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/co m.google.code.gson/gson/2.8.1/2a8e0aa38a2e21cb39e2f5a7d6704cbdc941da0/gson-2.8.1.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/glide-transformations-2.0。 1.aar/b078f70cacc24be94b8b93325260dc09/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/glide/3.7.0/9e9eeaf9948ee4d6c3ab354e8dc14368f16994 3.7.0.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/circleimageview-1.3.0.aar/de80af8de5f58d8c8d206f6a155983f9/jars/classes.jar --classpath_entry /Users/pq/。 gradle/caches/transforms-1/files-1.1/exoplayer-r2.3.1.aar/d2ae88c982af4647796c9970fc6e1a7f/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/calligraphy- 2.1.0.aar/d339434857786078a339f7bb8c6b1b89/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/library-1.0.5.aar/b8951b6a291a5e6dcb10ad712260f63a/classes.jar -classpath_entry /Users/pq/.gradle/caches/modules-2/files -2.1/com.nineoldandroids/library/2.4.0/e9b63380f3a242dbdbf103a2355ad7e43bad17cb/library-2.4.0.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons -lang3/3.4/5fe28b9518e58819180a43a850fbc0dd24b7c050/commons-lang3-3.4.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/firebase-core-11.2.0.aar/6e48ed9995842b507f13647/cjar28 .jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/android-adapters-2.1.0.aar/08d283ad9c4b052ffca9c687dc1e3b2b/jars/classes.jar --classpath_entry /Users/pq/.gradle /caches/modules-2/files-2.1/org.parceler/parceler-api/1.1.6/2a06b6b1ecf5dadee8a874dfb51ad018fde3e6c5/parceler-api-1.1.6.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1 /files-1.1/butterknife-8.4.0.aar/05f8241e57862f51f79e0523d0e3d1bc/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/kerningview-1.0.0.aar/ac0f6c2213c306facfdc32903 /jars/classes.jar --classpath_entry /U sers/pq/.gradle/caches/modules-2/files-2.1/com.flurry.android/analytics/6.4.2/4e6af3e20aff7888244687a9767b872e3881e822/analytics-6.4.2.jar --classpath_entry /Users/pq/.gradle/caches /transforms-1/files-1.1/play-services-gcm-11.0.4.aar/fad45efecbb74c6eff162197b1eb1fa4/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/mixpanel -android-5.0.2.aar/c5e3ba28099100a23d773854c2a084a0/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/ThinDownloadManager-1.3.0.aar/03e18d87a8d20f9b1944e3d1classesd68 .jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.airbnb/deeplinkdispatch/3.1.0/de0fff5510aa9b3e76e17c498f342b07577cb3fa/deeplinkdispatch-3.1.0.jar --classpath_entry /Users/pq/ .gradle/caches/transforms-1/files-1.1/relinker-1.2.2.aar/80ef4959756399d4d7a9a9b9607b5521/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/support -v13-25.2.0.aar/458c952d56ef1958492460222a5c9ad4/jars/ classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/appcompat-v7-25.3.1.aar/2b65524bb1dfaff43f55e61a19dff5cb/jars/classes.jar --classpath_entry /Users/pq/。 gradle/caches/transforms-1/files-1.1/transition-25.3.1.aar/8839b5b51b1844f4f1e76b9bc7d7a829/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/play- services-auth-11.0.4.aar/1dc6d7b9b9e417c0c02beb44f1f6074d/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/play-services-iid-11.0.4.aar/ fe5d1cfe286ef2ff895cb2a8243612ed/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/play-services-auth-base-11.0.4.aar/3aadee1c07f32f8fc543bb6a63735ca5/jars/classes.jar - -classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/play-services-base-11.0.4.aar/7731a52a7fbaa035349a55580682b05a/jars/classes.jar --classpath_entry /Users/pq/.gradle/缓存/转换-1/files-1.1/firebase-analytics-11.2.0.aar/61d81afc363bc8c865c16245e7 2c4d3e/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/firebase-analytics-impl-11.2.0.aar/ad4e6f99304117dc73c1d3b3b05760c9/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/firebase-iid-11.2.0.aar/9651e811bb6602fd5600e13c0f77df9f/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms- 1/files-1.1/firebase-common-11.2.0.aar/1331f5675014cd64782fd82fe1ba00a6/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/play-services-tasks- 11.2.0.aar/3e38d10ec79889323875e738fb65f287/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/play-services-basement-11.2.0.aar/e42f11c2ca206625f2890/cd632bd6 classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/support-v4-25.3.1.aar/0b7bcfd4905c5ac50204aa5421a48426/jars/classes.jar --classpath_entry /Users/pq/。 gradle/caches/transforms-1/files-1.1/support-fragment-25.3.1.aar/cd529e7062b91 5abaaddf7f4d73cfac9/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/support-core-utils-25.3.1.aar/56e47cfd160ed843d4216890e0682023/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.4.0/ea392375cf9ff59234a82e7928a204215ccc98cd/butterknife-annotations-8.4.0.jar --classpath_entry /Users/pq/. gradle/caches/transforms-1/files-1.1/material-spinner-1.1.0.aar/a1910f9ec27381bd317b2a22c9a2854e/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/ customtabs-25.0.0.aar/bacef9854d041e1a23293966aab92c92/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/animated-vector-drawable-25.3.1.aar/89ce02079a4f07a6e037eb99535be8/c jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/support-vector-drawable-25.3.1.aar/8ff74f175af9b6abba76eb3fa140cc20/jars/classes.jar --classpath_entry /Users /pq/.gradle/caches/transf orms-1/files-1.1/support-media-compat-25.3.1.aar/0ce9f8c2bae8fd1a0c62c91b27e5dffc/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/support- core-ui-25.3.1.aar/2b962af6d4052d7dcf1fe7b4fecffac6/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/support-compat-25.3.1.aar/3f45f1063eae680ce7cef7112056c988/ jars/classes.jar --classpath_entry /Users/pq/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.3.1/support-annotations-25.3.1.jar -- classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/adapter-rxjava/2.3.0/43e4ac24adc40a24c51b2d2a71a2483ef1b0ce9a/adapter-rxjava-2.3.0.jar --classpath_entry /Users/ pq/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.3.0/bcacde6a8ccedcc56c127403d26b76072fe6214d/retrofit-2.3.0.jar --classpath_entry /Users/pq/.gradle/caches/modules -2/files-2.1/com.squareup.okhttp3/okhttp/3.8.1/4d060ca3190df0eda4dc13415532a12 e15ca5f11/okhttp-3.8.1.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/org.greenrobot/eventbus/3.0.0/ddd99896e9569eaababbe81b35d80e1b91c4ad85/eventbus-3.0.0.jar - -classpath_entry /Users/pq/.gradle/caches/transforms-1/files-1.1/rxandroid-1.2.1.aar/5b18b7f07a2bab8a4a872f6e339e94a7/jars/classes.jar --classpath_entry /Users/pq/.gradle/caches/modules- 2/files-2.1/io.reactivex/rxjava/1.3.0/af000bec2036a2a9d07197c4b03b8966bfc60b03/rxjava-1.3.0.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.squareup。 okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0。 1/f7be08ec23c21485b9b5a1cf1654c2ec8c58168d/jsr305-3.0.1.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.parse.bolts/bolts-android/1.4.0/cc174c559b517798803ae/ android-1.4.0.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/c om.parse.bolts/bolts-applinks/1.4.0/8ad21bf21784dacce5f2043afb97218cc377e835/bolts-applinks-1.4.0.jar --classpath_entry /Users/pq/.gradle/caches/modules-2/files-2.1/com.parse。 bolts/bolts-tasks/1.4.0/d85884acf6810a3bbbecb587f239005cbc846dc4/bolts-tasks-1.4.0.jar --classpath_entry /Users/pq/Radio Africa/NakedGroove/app/build/intermediates/classes/debug --bootclasspath_entry /Users/pq /Library/Android/sdk/platforms/android-25/android.jar --bootclasspath_entry /Users/pq/Library/Android/sdk/platforms/android-25/optional/org.apache.http.legacy.jar --bootclasspath_entry /Applications/Android Studio 3.0 Preview.app/Contents/jre/jdk/Contents/Home/jre/lib/resources.jar --bootclasspath_entry /Applications/Android Studio 3.0 Preview.app/Contents/jre/jdk/Contents/Home/ jre/lib/rt.jar --bootclasspath_entry /Applications/Android Studio 3.0 Preview.app/Contents/jre/jdk/Contents/Home/jre/lib/jsse.jar --bootclasspath_entry /Applications/Android Studio 3.0 Preview.app/目录/jre/jdk/目录/Home/jre/lib /jce.jar --bootclasspath_entry /Applications/Android Studio 3.0 Preview.app/Contents/jre/jdk/Contents/Home/jre/lib/charsets.jar --min_sdk_version 19 --nodesugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes

我还缺少什么让它运行吗?

我的gradle文件如下:

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'

【问题讨论】:

显示你的build.gradle @IntelliJAmiya 检查build.gradle的更新问题 使用compileSdkVersion 26 buildToolsVersion "26.0.1" 我已经更新了我的问题需要解决方案 刚开始得到这个 【参考方案1】:

我在 ionic cordova 项目中遇到了这个问题

解决方案是一个干净的项目:

cordova clean android

希望对你有帮助

【讨论】:

非常感谢。此解决方案也适用于离子构建 我在这里尝试了所有解决方案,但没有任何效果:(。我也使用 IONIC。【参考方案2】:

错误:任务执行失败 ':app:transformClassesWithDesugarForDebug'.

com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException:执行时出错 带有主类的java进程 com.google.devtools.build.android.desugar.Desugar 带参数

打开你的 build.gradle 并在下面使用

android 
    compileSdkVersion 26
    buildToolsVersion "26.0.1"

然后Clean-Rebuild-Run

【讨论】:

由于 Android Studio 3.0 已经发布,最低要求 buildToolsVersion26.0.2,但是,在类似的情况下执行 cleanbuild 仍然对我有帮助,现在一切正常。而且我认为使 Android Studio 缓存无效会有所帮助,但没有 您好,这对我不起作用。我正在使用 android studion 3.0.1。请提出任何其他解决方案。 重点是将compileSdkVersionbuildToolVersion更新到最新的CleanRebuild 我没有改变任何东西,只是添加了一些新的类和代码,我得到了这个错误。我做了一个干净的重建,结果还是一样。事情是我大约 1 小时前刚刚建造的,还不错。【参考方案3】:

改变你的项目/build.gralde

compileOptions 
    //sourceCompatibility JavaVersion.VERSION_1_8
    //targetCompatibility JavaVersion.VERSION_1_8

重建.......好的, 我改变了这个文件。重建......编译apk成功! 希望对你有帮助

【讨论】:

是的,当我将它们注释掉时,它可以工作,但问题是我需要使用 java 8 这里也一样,从 build.gradle 中删除 Java 1.8 后,错误就消失了。但是,有人知道如何毫无问题地启用 Java 1.8 吗?【参考方案4】:

我只是通过删除“build/intermediates”目录来修复它。

【讨论】:

【参考方案5】:

就我而言,我将源兼容性和目标兼容性从 1.8 更改为 1.7,一切都开始工作了

【讨论】:

【参考方案6】:

就我而言,所有compileSdkVersionbuildToolsVersiontargetSdkVersion 都必须是相同的版本,尤其是compileSdkVersion。因为如果不定义compileSdkVersion,最后一个版本会自动导入,所以要小心。

【讨论】:

【参考方案7】:

我在 Flutter 项目中遇到了同样的问题。我目前正在使用 Android Studio 3.5.2,我可以解决以下问题:

    在项目build.gradle文件中,我升级为classpath 'com.android.tools.build:gradle:3.5.4' 在 gradle-wrapper.properties 文件中,我升级为distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

您可以从here 查看 Android Gradle 插件版本。

【讨论】:

以上是关于任务应用程序执行失败:Android Studio 3.0 Beta 2 上的transformClassesWithDesugarForDebug 错误的主要内容,如果未能解决你的问题,请参考以下文章

使用新 Android Studio 项目的任务“:app:dexDebug”的 Gradle 执行失败

任务应用程序执行失败:Android Studio 3.0 Beta 2 上的transformClassesWithDesugarForDebug 错误

Android Studio:错误:任务执行失败

Android Studio 构建失败并出现异常任务“:app:dexDebug”执行失败

错误:任务':app:transformClassesWithMultidexlistForDebug' android studio执行失败

Android Studio 3.0 任务执行失败:无法合并 dex