TransformException: java.util.zip.ZipException: дублирующаяся запись: android/support/v4/widget/ExploreByTouchHelper.class

-6

У меня возникла ошибка во время сборки Gradle:

Ошибка: выполнение выполнено для задачи> ': app: transformClassesWithJarMergingForDebug.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: дубликат записи: android/support/v4/widget/ExploreByTouchHelper.class

Я также проверял зависимости:

release
+--- com.android.support:multidex:1.0.1
+--- com.google.android.gms:play-services:8.4.0
| +--- com.google.android.gms:play-services-ads:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-analytics:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-appindexing:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-appinvite:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-appstate:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-auth:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-cast:8.4.0
| | +--- com.google.android.gms:play-services-base:8.4.0
| | | \--- com.google.android.gms:play-services-basement:8.4.0
| | | \--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | \--- com.android.support:mediarouter-v7:23.0.0
| | +--- LOCAL: internal_impl-23.0.0.jar
| | \--- com.android.support:appcompat-v7:23.2.1
| | +--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | +--- com.android.support:animated-vector-drawable:23.2.1
| | | \--- com.android.support:support-vector-drawable:23.2.1
| | | \--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | \--- com.android.support:support-vector-drawable:23.2.1
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-drive:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-fitness:8.4.0
| | +--- com.google.android.gms:play-services-base:8.4.0
| | | \--- com.google.android.gms:play-services-basement:8.4.0
| | | \--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | \--- com.google.android.gms:play-services-location:8.4.0
| | +--- com.google.android.gms:play-services-base:8.4.0
| | | \--- com.google.android.gms:play-services-basement:8.4.0
| | | \--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | \--- com.google.android.gms:play-services-maps:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-games:8.4.0
| | +--- com.google.android.gms:play-services-base:8.4.0
| | | \--- com.google.android.gms:play-services-basement:8.4.0
| | | \--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | \--- com.google.android.gms:play-services-drive:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-gcm:8.4.0
| | +--- com.google.android.gms:play-services-base:8.4.0
| | | \--- com.google.android.gms:play-services-basement:8.4.0
| | | \--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | \--- com.google.android.gms:play-services-measurement:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-identity:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-location:8.4.0
| | +--- com.google.android.gms:play-services-base:8.4.0
| | | \--- com.google.android.gms:play-services-basement:8.4.0
| | | \--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | \--- com.google.android.gms:play-services-maps:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-maps:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-measurement:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-nearby:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-panorama:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-plus:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-safetynet:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-vision:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.google.android.gms:play-services-wallet:8.4.0
| | +--- com.google.android.gms:play-services-base:8.4.0
| | | \--- com.google.android.gms:play-services-basement:8.4.0
| | | \--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | +--- com.google.android.gms:play-services-identity:8.4.0
| | | \--- com.google.android.gms:play-services-base:8.4.0
| | | \--- com.google.android.gms:play-services-basement:8.4.0
| | | \--- com.android.support:support-v4:23.2.1
| | | \--- LOCAL: internal_impl-23.2.1.jar
| | \--- com.google.android.gms:play-services-maps:8.4.0
| | \--- com.google.android.gms:play-services-base:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| \--- com.google.android.gms:play-services-wearable:8.4.0
| \--- com.google.android.gms:play-services-base:8.4.0
| \--- com.google.android.gms:play-services-basement:8.4.0
| \--- com.android.support:support-v4:23.2.1
| \--- LOCAL: internal_impl-23.2.1.jar
+--- com.android.support:appcompat-v7:23.2.1
| +--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| +--- com.android.support:animated-vector-drawable:23.2.1
| | \--- com.android.support:support-vector-drawable:23.2.1
| | \--- com.android.support:support-v4:23.2.1
| | \--- LOCAL: internal_impl-23.2.1.jar
| \--- com.android.support:support-vector-drawable:23.2.1
| \--- com.android.support:support-v4:23.2.1
| \--- LOCAL: internal_impl-23.2.1.jar
+--- com.mcxiaoke.volley:library-aar:1.0.0
+--- com.android.support:recyclerview-v7:24.2.0
| +--- com.android.support:support-compat:24.2.0
| | \--- LOCAL: internal_impl-24.2.0.jar
| \--- com.android.support:support-core-ui:24.2.0
| +--- LOCAL: internal_impl-24.2.0.jar
| \--- com.android.support:support-compat:24.2.0
| \--- LOCAL: internal_impl-24.2.0.jar
\--- com.android.support:cardview-v7:24.2.0

спросил(а) 2021-01-25T12:04:21+03:00 4 месяца, 3 недели назад
1
Решение
99

Откройте системную командную строку/терминал → Перейдите в путь к папке проекта (папка с корневым проектом) → Выполните следующую команду: команда: - gradlew clean или ./gradlew clean

Убедитесь, что все ваши зависимости градиента имеют одинаковую версию. → Пример: - ваши зависимости appcompat и recycliewiew должны иметь такую же версию.

→ Измените зависимости градиента на ту же версию, что и: -

compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'

→ Восстановите свой проект, и он будет работать нормально.

ответил(а) 2021-01-25T12:04:21+03:00 4 месяца, 3 недели назад
100

Я смог решить эту проблему, используя самые последние версии appcompat и recyclerview для моего compileSdkVersion.

Поскольку для моего compileSdkVersion установлено значение 23, я изменил свои зависимости от градиента:


compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'

Я заметил, что у вас есть несоответствующие версии appcompat и recyclerview. Один из них не соответствует вашей команде compileSdkVersion. Если вы откроете файл build.gradle, вы увидите предупреждение об этом. Надеюсь это поможет.

ответил(а) 2021-01-25T12:04:21+03:00 4 месяца, 3 недели назад
Ваш ответ
Введите минимум 50 символов
Чтобы , пожалуйста,
Выберите тему жалобы:

Другая проблема