Duplicate library or class?

Duplicate library or class?

In some cases you might end up having same library attached more then once. It might even have different name, different version and file format (.aar/.jar) but still cause this error. Also it might be attached as physical file inside the project and at the same time it might be automatically downloaded from some repository during compile time and also causes this error.

Problem is that mostly it does not point to the files that cause this error but only print some java class on which it stumble first while compiling.

Example of such error (message might be different based on build tool and version):
Program type already present: com.mobvista.msdk.mvjscommon.a.a$b$a
Message{kind=ERROR, text=Program type already present: com.mobvista.msdk.mvjscommon.a.a$b$a, sources=[Unknown source file], tool name=Optional.of(D8)}

    • Related Articles

    • Getting linker error?

      It says “_OBJC_CLASS_$_CLASSNAME”, referenced from. This error means that a linked library is missing, usually prefix of class name tells you which library it is but if you can’t see it better to check required libraries list.
    • Manifest merge failed

      Normally it is strange if this error happened. Potential causes might be when some strange project or some strange libraries/modules setup is done. Manifest merge errors happen usually in Unity but sometimes even in AndroidStudio. Example of such ...
    • Project does not compile?

      This is the most problematic case especially if it is Unity project. So probably try following solutions from this documentation or just contact support@appmediation.com. Here are some reasons that might cause project to stop compiling: Manifest ...
    • My project compiled successfully but why I see no ads?

      Unity only - First thing to check if test is on real device or emulator or using Unity preview and if its on Unity preview then we do not support Unity studio preview mode so its expected.  Both Unity and Android Studio. Please check Android device ...
    • Can I set more then one banner on the same screen?

      No, At the moment only one banner per screen (more precise: per Activity) is allowed.