2017-07-20 220 views
1

錯誤:執行任務':app:transformClassesWithDesugarForDebug'失敗。錯誤:java.lang.ClassNotFoundException:Class org.openjdk.jdi.ReferenceType not found

com.android.build.api.transform.TransformException: java.lang.RuntimeException: 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 {--input C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.errorprone\javac\9-dev-r3297-1-shaded\f6d4998965282068a3feecddc21578d23f17275\javac-9-dev-r3297-1-shaded.jar --output C:\Users\ADMIN\AndroidStudioProjects\MyApplication6\app\build\intermediates\transforms\desugar\debug\47.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\extensions-1.0.0-alpha5.aar\8f6fc0da20d38b403871ce8229e8ad50\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\runtime-1.0.0-alpha5.aar\8a4489d5cc81ea23ea71206353fc7255\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.squareup.retrofit2\converter-gson\2.3.0\9e09011e9767bb76b5e27c9b8223476b93b14631\converter-gson-2.3.0.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.8.1\2a8e0aa38a2e21cb39e2f5a7d6704cbdc941da0\gson-2.8.1.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.squareup.retrofit2\retrofit\2.3.0\bcacde6a8ccedcc56c127403d26b76072fe6214d\retrofit-2.3.0.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.github.bumptech.glide\glide\3.8.0\9bada650e1afe9c6174ddc0d113c1fce4dc26fe0\glide-3.8.0.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.squareup.picasso\picasso\2.5.2\7446d06ec8d4f7ffcc53f1da37c95f200dcb9387\picasso-2.5.2.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.dagger\dagger-compiler\2.11\756e69064a68fd9e25a9009604ca174ac71a3cee\dagger-compiler-2.11.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.dagger\dagger-android-processor\2.11\70dbaa743b0675501df4d5bdc821728b2e0d932d\dagger-android-processor-2.11.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\dagger-android-support-2.11.aar\201271be76c5243e0d3e6501edcf6f7b\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\dagger-android-2.11.aar\1ae8a189f0dfadac5ee62b59a460f9a8\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.dagger\dagger-producers\2.11\4331ce4fb6a91682127000f88a2e3b8bd441d3fc\dagger-producers-2.11.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.dagger\dagger\2.11\95037eaee68aa48021511972e9db9ba29916e1c9\dagger-2.11.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\recyclerview-v7-26.0.0-beta2.aar\1d04c75b156851decf6158ad0b6baa91\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\multidex-1.0.2.aar\4bdf8713c02c7bcacf5d7bba40a573bc\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\adapters-1.3.1.aar\44a4f28def6895101fd1be302de59d20\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\library-1.3.1.aar\fa67f4a3d3124466664bc95a81729d2f\jars\classes.jar --classpath_entry C:\Users\ADMIN\Desktop\android-studio\gradle\m2repository\com\android\databinding\baseLibrary\3.0.0-alpha7\baseLibrary-3.0.0-alpha7.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.0.0-beta2.aar\5924197e9a2457796f817777cdd08f93\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\constraint-layout-1.0.2.aar\923a04de9cb535b3cd5e2695296076e5\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\cardview-v7-26.0.0-beta2.aar\efd9af453b9d63f096b3a11dba984305\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\runtime-1.0.0-alpha5.aar\fc41c83071692c34834010cf5e0868ff\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\android.arch.lifecycle\common\1.0.0-alpha5\16bbceb3231045909d9b2d19758c57a30831ce9f\common-1.0.0-alpha5.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\runtime-1.0.0-alpha5.aar\76f20618807b2b83670913f0b7e407c2\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\android.arch.core\common\1.0.0-alpha5\ef1ec521c95486fb256b3677a95c340ce9c49407\common-1.0.0-alpha5.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\support-v4-26.0.0-beta2.aar\a662acc1e2403d4ba16c7f48349e7ea8\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\support-fragment-26.0.0-beta2.aar\fce84c223ce35468788f40c4d65ed060\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\android.arch.persistence.room\common\1.0.0-alpha5\da7c4f373e9a9e114fc3a12edcbb7bd7f8822b4b\common-1.0.0-alpha5.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\support-db-impl-1.0.0-alpha5.aar\fc9a786657d6f6356de7bf7a5473044c\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\support-db-1.0.0-alpha5.aar\09617b55aab66c2ff9f18f3e56b3ef36\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\support-core-utils-26.0.0-beta2.aar\56812f54b7431ba56ef67800d0d0dcc0\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.squareup.okhttp3\okhttp\3.8.0\5a11f020cce2d11eb71ba916700600e18c4547e7\okhttp-3.8.0.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.1\f7be08ec23c21485b9b5a1cf1654c2ec8c58168d\jsr305-3.0.1.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.googlejavaformat\google-java-format\1.3\949e85e75b3160ce1446aa99d806d5b509631b02\google-java-format-1.3.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.guava\guava\21.0\3a3d111be1be1b745edfa7d91678a12d7ed38709\guava-21.0.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.squareup\javapoet\1.7.0\4fdcf1fc27c1a8f55d1109df986c923152f07759\javapoet-1.7.0.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\javax.inject\javax.inject\1\6975da39a7040257bd51d21a231b76c915872d38\javax.inject-1.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.dagger\dagger-android-jarimpl\2.11\bb43b5199a1065f0f0581ebce14b46b99b9c20f9\dagger-android-jarimpl-2.11.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.dagger\dagger-android-support-jarimpl\2.11\c9d0866780279a3ad22052ac35d18eeb0474a770\dagger-android-support-jarimpl-2.11.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\animated-vector-drawable-26.0.0-beta2.aar\6ecf752d5c8c50cdf570abed8ce97e71\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\support-vector-drawable-26.0.0-beta2.aar\e99fe293d30a27888a838a8d9c6fcd41\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\support-core-ui-26.0.0-beta2.aar\4f371dc6bcab7abfb5585b47251d78e1\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\support-media-compat-26.0.0-beta2.aar\e505e4d67ce6ac61ea66a9c4a237cd9c\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\transforms-1\files-1.1\support-compat-26.0.0-beta2.aar\0863369e5d0bfb1291c6f1c0a0bfafc1\jars\classes.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.android.support\support-annotations\26.0.0-beta2\e5ef6e4822404221c9b03dff0d31e4810ac3fb0d\support-annotations-26.0.0-beta2.jar --classpath_entry E:\sdk\extras\m2repository\com\android\support\constraint\constraint-layout-solver\1.0.2\constraint-layout-solver-1.0.2.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.squareup.okio\okio\1.13.0\a9283170b7305c8d92d25aff02a6ab7e45d06cbe\okio-1.13.0.jar --classpath_entry C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\com.google.errorprone\javac\9-dev-r3297-1-shaded\f6d4998965282068a3feecddc21578d23f17275\javac-9-dev-r3297-1-shaded.jar --classpath_entry C:\Users\ADMIN\AndroidStudioProjects\MyApplication6\app\build\intermediates\classes\debug --bootclasspath_entry E:\sdk\platforms\android-26\android.jar --bootclasspath_entry E:\sdk\platforms\android-26\optional\org.apache.http.legacy.jar --bootclasspath_entry C:\Users\ADMIN\Desktop\android-studio\jre\jre\lib\resources.jar --bootclasspath_entry C:\Users\ADMIN\Desktop\android-studio\jre\jre\lib\rt.jar --bootclasspath_entry C:\Users\ADMIN\Desktop\android-studio\jre\jre\lib\jsse.jar --bootclasspath_entry C:\Users\ADMIN\Desktop\android-studio\jre\jre\lib\jce.jar --bootclasspath_entry C:\Users\ADMIN\Desktop\android-studio\jre\jre\lib\charsets.jar --min_sdk_version 15 --desugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes}

錯誤是什麼?

回答

0

目前尚不清楚,但因爲我看到你使用了這麼多的庫,所以也許你必須使用MultiDex。 將multiDexEnabled true添加到您的gradle文件。

defaultConfig { 
     applicationId "com.company.application" 
     minSdkVersion 19 
     targetSdkVersion 25 
     versionCode 1 
     multiDexEnabled true // this line 
} 

dependencies { 
    compile 'com.android.support:multidex:1.0.1' 
} 

然後去你manifest.xml,並添加:

<application 
      android:name="android.support.multidex.MultiDexApplication" //this line > 
</application> 

full documentation

+0

我已經加入,但仍然有錯誤 – Rajakrishnan

相關問題