Ионное выполнение не выполнено для задачи ': app: transformClassesWithDesugarForRelease' - PullRequest
0 голосов
/ 12 ноября 2018

Я получаю эту ошибку, когда пытаюсь собрать Android на своем ноутбуке и в панели инструментов Ionic Pro.

[04:27:55]: ▸ FAILURE: Build failed with an exception.
[04:27:55]: ▸ * What went wrong:
[04:27:55]: ▸ Execution failed for task ':app:transformClassesWithDesugarForRelease'.
[04:27:55]: ▸ > 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 /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/43.jar --output /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/desugar/release/45.jar --input /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/49.jar --output /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/desugar/release/51.jar --input /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/37.jar --output /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/desugar/release/39.jar --input /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/3.jar --output /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/desugar/release/5.jar --input /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/28.jar --output /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/desugar/release/30.jar --input /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/47.jar --output /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/desugar/release/49.jar --input /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/19.jar --output /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/desugar/release/21.jar --input /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/44.jar --output /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/desugar/release/46.jar --classpath_entry /builds/user/anonymous-social/platforms/android/CordovaLib/build/intermediates/intermediate-jars/release/classes.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/classes/release --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/0.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/1.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/2.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/3.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/4.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/5.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/6.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/7.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/8.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/9.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/10.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/11.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/12.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/13.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/14.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/15.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/16.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/17.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/18.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/19.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/20.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/21.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/22.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/23.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/24.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/25.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/26.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/27.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/28.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/29.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/30.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/31.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/32.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/33.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/34.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/35.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/36.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/37.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/38.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/39.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/40.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/41.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/42.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/43.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/44.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/45.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/46.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/47.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/48.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/49.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/50.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/51.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/52.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/53.jar --classpath_entry /builds/user/anonymous-social/platforms/android/app/build/intermediates/transforms/stackFramesFixer/release/54.jar --bootclasspath_entry /opt/android-sdk/platforms/android-27/android.jar --bootclasspath_entry /opt/android-sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar --bootclasspath_entry /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar --bootclasspath_entry /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar --bootclasspath_entry /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar --bootclasspath_entry /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar --min_sdk_version 19 --nodesugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes}

Для полной детализации сборки я сделал пастинку: https://pastebin.com/QmJ6Tee3

Я заметил, что если я войду в Platforms > android > project.properties, мои данные:

target=android-27
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.gradle.include.1=cordova-android-firebase-gradle-release/bemochi-cordova-android-firebase-gradle-release.gradle
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.gradle.include.2=cordova-plugin-firebase/bemochi-build.gradle
cordova.system.library.2=com.google.gms:google-services:+
cordova.system.library.3=com.google.android.gms:play-services-tagmanager:+
cordova.system.library.4=com.google.firebase:firebase-core:+
cordova.system.library.5=com.google.firebase:firebase-messaging:+
cordova.system.library.6=com.google.firebase:firebase-crash:+
cordova.system.library.7=com.google.firebase:firebase-config:+
cordova.system.library.8=com.google.firebase:firebase-perf:+
cordova.system.library.9=com.google.android.gms:play-services-analytics:16.0.3
cordova.system.library.10=com.google.android.gms:play-services-location:15.+
cordova.system.library.11=com.android.support:support-v4:26.+
cordova.system.library.12=com.android.support:appcompat-v7:26.+
cordova.gradle.include.3=me.tonny.cordova.plugins.multidex/bemochi-build.gradle

Я не уверен, что делаю не так.

Я не уверен, поможет ли это, но у моего build.gradle есть этот раздел:

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
    //This replaces project.properties w.r.t. build settings
    project.ext {
      defaultBuildToolsVersion="27.0.1" //String
      defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
      defaultTargetSdkVersion=27 //Integer - We ALWAYS target the latest by default
      defaultCompileSdkVersion=27 //Integer - We ALWAYS compile with the latest by default
    }
}

Я также читал, что когда у вас есть эта проблема, вы можете использовать 2 плагина для ее устранения, но они явно не работают для меня (config.xml):

<plugin name="cordova-android-support-gradle-release" spec="1.4.7">
    <variable name="ANDROID_SUPPORT_VERSION" value="15.+" />
</plugin>
<plugin name="cordova-android-firebase-gradle-release" spec="^2.0.0">
    <variable name="FIREBASE_VERSION" value="15.+" />
</plugin>

Полагаю, есть проблема с версиями Firebase и сервисов Google, но я не совсем уверен ... Я пробовал несколько версий и, похоже, не могу понять.

Есть идеи?

Ответы [ 3 ]

0 голосов
/ 25 ноября 2018

Я тоже сталкивался с такой проблемой. Моя проблема была с cordova-plugin-firebase. Выполните следующие действия.

1. Удалить платформу Android.

ionic cordova platform rm android

2. Удалить cordova-plugin-firebase плагин.

ionic cordova plugin rm cordova-plugin-firebase

3. Снова добавьте плагин cordova-plugin-firebase с версией 1.0.0.

ionic cordova plugin add cordova-plugin-firebase@1.0.0

4. Снова добавьте платформу Android.

ionic cordova platform add android

5. Сборка приложения Ionic для Android

ionic cordova build android

Не стесняйтесь комментировать любые проблемы, с которыми вы столкнулись.

0 голосов
/ 27 ноября 2018

Я решил проблему. Был конфликт с моими cordova-plugin-firebase и cordova-plugin-google-analytics, поэтому мне пришлось перейти на более низкую версию cordova-plugin-google-analytics до версии 1.8.3, которая сработала для меня.

Простое исправление в конце, но абсолютно нулевое указание в журнале ошибок, что это может быть проблемой. Очень расстраивает.

0 голосов
/ 12 ноября 2018

Что нужно сделать :

  1. Удалите папку Platform из своего проекта.
  2. Откройте ваш ионный проект с android студия

Теперь выполните следующие команды в андроид студии:

Ионная сборка Cordova Затем запрашивается Android и IOS, затем введите Android

Не стесняйтесь комментировать для получения дополнительной помощи :)

...