Caused by: com.android.dex.DexException: Multiple dex files define Lcom/esotericsoftware/reflectasm/MethodAccess;
The above error is preventing my Android project from building, I'm using Kryonet and including it in my build.gradle as a dependency below.
dependancies{
implementation group: 'kryonet', name: 'kryonet', version: '2.21'
implementation group: 'com.esotericsoftware', name: 'kryo', version: '4.0.1'
It seems both Kryo and Kryonet include this class, but I don't know how to go about resolving the issue, I can't simply remove Kryo because then I lose access to the serialization libraries.
If you run
gradle app:dependencies
you can notice that the dependencies tree is:They have exactly the same dependencies, but Kyro depends on newer versions. So I would simply remove the dependency on kyronet
EDIT
This should solve your problem and let you keep both of the libraries