- Двойные классы от androidx и com.android.support
- 3 ответа
- 5.5.9 : building errors: Duplicate class android.support.v4.app.INotificationSideChannel .. #82
- Comments
- YuliyF commented Sep 20, 2019
- chauduyphanvu commented Sep 20, 2019
- chauduyphanvu commented Sep 23, 2019
- ttesla commented Sep 24, 2019
- chauduyphanvu commented Sep 24, 2019
- ttesla commented Sep 30, 2019
- chauduyphanvu commented Oct 1, 2019
- rsatrasala commented Oct 11, 2019
- Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar _ #181
- Comments
- kyodgorbek commented Apr 29, 2019
- Дублировать класса андроид.поддержка.В4.приложение.INotificationSideChannel нашли в классы модулей?
- Android resolver issues with Unity 2019.3 and Multidex #296
- Comments
- mvaivre commented Nov 11, 2019
- Context:
- Issues:
Двойные классы от androidx и com.android.support
Я недавно обновил свою Android Studio (и я уверен, что версия Gradle), и теперь я получаю кучу ошибок при попытке скомпилировать мой проект. Вот тот, который мучает меня в данный момент:
Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Далее следует множество похожих.
Я пытался удалить все варианты использования com.android.support в пользу androidx (см. здесь для то, что я использовал для замены), но com.android.support библиотеки все еще используются, даже когда я удаляю библиотеки (они просто переделываются, когда я пытаюсь снова скомпилировать).
Вот ссылка на полную ошибку, которую я получаю.
3 ответа
Добавьте эти строки в gradle.properties :
Если gradle.properties отсутствует, создайте файл в корневом каталоге вашего проекта.
Похоже, у вас есть support реликвии где-нибудь в ваших зависимостях, возможно из библиотеки? Чтобы исследовать и увидеть дерево зависимостей, пожалуйста, запустите:
И тогда вы видите, откуда это приходит.
В вашем приложении build.gradle вы используете смесь старой библиотеки поддержки и новых артефактов библиотеки поддержки. Удалите один из них из своего build.gradle , чтобы решить эту проблему.
Старый артефакт: com.android.support:support-compat
Соответствующий новый артефакт: androidx.core:core:1.0.0
Перейдите в Gradle Scripts-> gradle.properties а затем вставьте этот код:
И повторно опровергните ваш проект. удачи 🙂
Источник
5.5.9 : building errors: Duplicate class android.support.v4.app.INotificationSideChannel .. #82
Comments
YuliyF commented Sep 20, 2019
I got a list of errors after updating MoPub to 5.5.9 :
- java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:27.1.1)
- Duplicate class android.support.v4.os.IResultReceiver found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:27.1.1)
.
and so on. And I can’t fix it. I added:
android.useAndroidX=true
android.enableJetifier=true
and get a build but it’s crashed on start
The text was updated successfully, but these errors were encountered:
chauduyphanvu commented Sep 20, 2019
@YuliyF, we do not have a 5.5.9 version. Did you mean 5.9.0?
If you are integrating from Unity, did you enable the Jetifier in Unity (in the Play Services Jar Resolver’s settings) instead of doing that in the exported Android project? If not, give that a try and let us know if you continue seeing the issue.
If you still see the issue, send us your zipped Unity project and we’re happy to take a look!
Vu Chau
MoPub SDK Team
chauduyphanvu commented Sep 23, 2019
@YuliyF, did you have a chance to try the suggestion in my previous response? Let us know if you resolved the issue or still need assistance!
ttesla commented Sep 24, 2019
Similar error here.
Mopub 5.9.0
Unity 2018.4.9f1
IL2cpp, 64 bit.
Facebook SDK 7.17.2
GameAnalytics 5.1.11
All mediation networks.
Tried jetifier, didn’t work.
chauduyphanvu commented Sep 24, 2019
@ttesla, do you have a Unity project that reproduces that crash? If not, is it possible for you to reproduce it in our Unity sample app on this repository? If yes, could you share the reproduction steps?
ttesla commented Sep 30, 2019
After trying many combinations, Jetifier actually worked out. But I had to disable «auto resolution» and «resolution on build» from «Android Resolver Settings». I had to use «force resolution». Or else it doesn’t add these lines to my graddle which actually enables jetifier.
Thank you, my issue is resolved.
([rootProject] + (rootProject.subprojects as List)).each
chauduyphanvu commented Oct 1, 2019
@ttesla, thanks for letting us know what you tried. You can actually enable the Jetifier right in the Jar Resolver settings without needing to fiddle with Gradle:
Give that a try and let us know if that works!
rsatrasala commented Oct 11, 2019
If the issue persists, please create a new issue. Closing this one.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar _ #181
Comments
kyodgorbek commented Apr 29, 2019
I am developing a chat app using your library I am getting the following errors from gradle console
Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.core.graphics.drawable.IconCompatParcelizer found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.core.internal.package-info found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.versionedparcelable.CustomVersionedParcelable found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.NonParcelField found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelField found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelImpl found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelImpl$1 found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelUtils found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel$1 found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel$ParcelException found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelParcel found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream$FieldBuffer found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream$InputBuffer found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelable found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelize found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
below my app.gradle
apply plugin: ‘com.android.application’
android <
compileSdkVersion 28
defaultConfig <
applicationId «com.example.myapplication»
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName «1.0»
testInstrumentationRunner «android.support.test.runner.AndroidJUnitRunner»
>
buildTypes <
release <
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.pro’
>
>
>
dependencies <
implementation fileTree(dir: ‘libs’, include: [‘*.jar’])
implementation ‘com.android.support:appcompat-v7:28.0.0’
implementation ‘com.android.support.constraint:constraint-layout:1.1.3’
testImplementation ‘junit:junit:4.12’
androidTestImplementation ‘com.android.support.test 🏃 1.0.2’
implementation ‘com.github.bassaer:chatmessageview:2.0.1’
implementation ‘com.google.code.gson:gson:2.8.5’
androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2’
>
The text was updated successfully, but these errors were encountered:
Источник
Дублировать класса андроид.поддержка.В4.приложение.INotificationSideChannel нашли в классы модулей?
Я занимаюсь разработкой новостное приложение, но я получаю следующие ошибки в консоли Gradle в
ниже мое приложение.Gradle в
Вы можете добавить ниже строки в Gradle свой`.файл свойств:
Я нарваться на что-то вроде этого, и ниже, основывается на моем ответ:
Ваш проект (или один из его суб-проектов) имеет в виду зависимость с помощью + плюс-знак в его конце, как ком.Гугл.опорного пункта:огневая база-авт:+ , что означает, что использование любой более поздней версии, когда это возможно, и что более новые версии не через андроид.библиотеки поддержки, и вместо этого использует androidx`; чтобы устранить эту проблему, выполните следующие действия.
- Убедитесь в том, что ANDROID_HOME среду-переменная установлена, а затем откройте окно консоли (вроде Git-Bash, так как держит всю команду выход), и компакт на ваш андроид каталог (для ионных проектов следует `платформы/Андроид).
- Во-первых, Список всех зависимостей путем запуска ниже (в Git-Баш): ./gradlew :приложение:зависимости
- Скопируйте результат в ваш любимый текстовый редактор и поиска для androidx .
- Если вы нашли что-то выполните следующие действия, то вы молодец! (и вам не нужно повторять эти шаги).
- Прокрутки вверх, пока не увидите -> в конце любой строки, как, например, 16.0.8 -> 19.0.0 или + -> 19.0.0 , которые означают, что версия была устранена автоматически (что-то выше, чем указанный вами, потому что из +).
- Таким образом, установить версию вручную:
- Если возможно, в вашем проекта (или подпроекта) найти и заменить + знак с определенной версией.
- Или, силу конкретной версии зависимостей, как упомянуто ниже.
- Наконец, повторите описанные выше шаги (но вместо шага просто очистить в консоли).
К удельная сила версии зависимостей добавить для создания корневой`.Gradle в файл что-то вроде ниже (который является тем, что работал для меня), но, конечно, редактирования и добавления собственных правил (потому что это может не работать для вашего случая):
Источник
Android resolver issues with Unity 2019.3 and Multidex #296
Comments
mvaivre commented Nov 11, 2019
Context:
Unity editor version: 2019.3b10
Play Services Resolver version: 1.2.131
Features in Play Services Resolver in use (Android Resolver, iOS Resolver, VersionHandler, etc.): Android Resolver
Plugins SDK in use (Firebase, Admob, Facebook, etc.): Appodeal, Google Play Games
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): Android
Scripting Runtime (Mono, and/or IL2CPP): IL2CPP
Issues:
I’ve hit many issues when building with Gradle while trying to add Appodeal, which requires Multidex. Let me try to summarise the roadblocks I encountered:
When trying to activate Multidex com.android.support:multidex:1.0.3 i’m seing the error «More than one file was found with OS independent path ‘androidsupportmultidexversion.txt'» which seems to indicate that two different version of Multidex are conflicting. By using gradle androidDependencies , I was able to see that an AndroidX version of Multidex was already included in the build, but I’ve no idea where it comes from :/
By pinning the multidex version to the AndroidX version, I got rid of the issue shown above. but then multidex is not enabled (ie. the >65k methods error is back).
Finally, when adding Google Play Games, I’m seeing the error «Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy» which seems to indicate another conflict between Appodeal and Play Games dependencies. Shouldn’t dependency merges be normally handled by the resolver?
I’ve tried all kind of settings in the resolver (deactivate Gradle file patching, Jetifier is on. ), it never worked.
Could those issues be caused by the new «Unity as a library» implementation (as of 2019.3), that introduces a new project structure? => https://forum.unity.com/threads/using-unity-as-a-library-in-native-ios-android-apps.685195/
Does anyone succeed in having the resolver + multidex working with Unity 2019.3?
Thanks so much in advance for your help!
The text was updated successfully, but these errors were encountered:
Источник