Skip to content

Android resolver issues with Unity 2019.3 and Multidex #296

Closed
@mvaivre

Description

@mvaivre

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:

  1. 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 :/

  2. 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).

  3. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions