Я использую последнюю стабильную версию Android Studio (Otter 2), и зависимости моей библиотеки не сообщают о каких-либо новых доступных версиях.
Я пишу класс, который будет анализировать объекты JSON с жизнью в библиотечном модуле, который будет использоваться как в этом приложении для Android, так и на сервере в Джакарте. Поэтому я выбрал com.googlecode.json-simple:json-simple в качестве библиотеки анализатора JSON.
При добавлении этой библиотеки возникает ряд ошибок класса dupl;icate, связанных с библиотекой hamcrest-core-1.1.jar (см. ниже). Удаление моей библиотеки и добавление зависимости runtimeOnly к библиотеке json-simple также приводит к ошибкам.
После поиска в Google я нашел ряд предложений в теме:
configurations {
compile.exclude group: "junit", module: "junit"
}
Куполу, которому исполнилось 10 лет. Либо они не устранили проблему (добавил ли я предложение в блоке android или на верхнем уровне), либо синтаксически они потерпели неудачу. Так что мне либо не хватает чего-то простого, либо они не работают для версии Gradle, которую я использую (8.13).
Как всегда, благодарю за любые предложения.
Дубликаты ошибок:
Duplicate class org.hamcrest.BaseDescription found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.BaseMatcher found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.CoreMatchers found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.Description found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.Factory found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.Matcher found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.SelfDescribing found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.StringDescription found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.AllOf found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.AnyOf found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.DescribedAs found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.Is found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsAnything found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsEqual found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsInstanceOf found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsNot found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsNull found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsSame found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.internal.ArrayIterator found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.internal.SelfDescribingValue found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.internal.SelfDescribingValueIterator found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Подробнее здесь: https://stackoverflow.com/questions/798 ... mple-added
Дубликаты ошибок класса Hamcrest при добавлении зависимости времени выполнения от Json-Simple ⇐ Android
Форум для тех, кто программирует под Android
1767074787
Anonymous
Я использую последнюю стабильную версию Android Studio (Otter 2), и зависимости моей библиотеки не сообщают о каких-либо новых доступных версиях.
Я пишу класс, который будет анализировать объекты JSON с жизнью в библиотечном модуле, который будет использоваться как в этом приложении для Android, так и на сервере в Джакарте. Поэтому я выбрал com.googlecode.json-simple:json-simple в качестве библиотеки анализатора JSON.
При добавлении этой библиотеки возникает ряд ошибок класса dupl;icate, связанных с библиотекой hamcrest-core-1.1.jar (см. ниже). Удаление моей библиотеки и добавление зависимости runtimeOnly к библиотеке json-simple также приводит к ошибкам.
После поиска в Google я нашел ряд предложений в теме:
configurations {
compile.exclude group: "junit", module: "junit"
}
Куполу, которому исполнилось 10 лет. Либо они не устранили проблему (добавил ли я предложение в блоке android или на верхнем уровне), либо синтаксически они потерпели неудачу. Так что мне либо не хватает чего-то простого, либо они не работают для версии Gradle, которую я использую (8.13).
Как всегда, благодарю за любые предложения.
Дубликаты ошибок:
Duplicate class org.hamcrest.BaseDescription found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.BaseMatcher found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.CoreMatchers found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.Description found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.Factory found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.Matcher found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.SelfDescribing found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.StringDescription found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.AllOf found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.AnyOf found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.DescribedAs found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.Is found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsAnything found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsEqual found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsInstanceOf found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsNot found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsNull found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsSame found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.internal.ArrayIterator found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.internal.SelfDescribingValue found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Duplicate class org.hamcrest.internal.SelfDescribingValueIterator found in modules hamcrest-core-1.1.jar -> hamcrest-core-1.1 (org.hamcrest:hamcrest-core:1.1) and junit-4.10.jar -> junit-4.10 (junit:junit:4.10)
Подробнее здесь: [url]https://stackoverflow.com/questions/79856800/duplicate-hamcrest-class-errors-when-runtime-dependsancy-on-json-simple-added[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия