Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Androidx duplicate dependencies #258

Open
pavelpoley opened this issue Jun 26, 2019 · 7 comments
Open

Androidx duplicate dependencies #258

pavelpoley opened this issue Jun 26, 2019 · 7 comments

Comments

@pavelpoley
Copy link

I started AndroidX project, i am using this dependencies:

`  //implementation "com.arello-mobile:moxy:$moxy"

    implementation "com.arello-mobile:moxy-app-compat:$moxy"

    annotationProcessor "com.arello-mobile:moxy-compiler:$moxy"

    implementation 'tech.schoolhelper:moxy-x-androidx:1.7.0'`

but in build process getting this error:

Duplicate class com.arellomobile.mvp.DefaultView found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.DefaultViewState found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.InjectViewState found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.MvpAppCompatActivity found in modules jetified-moxy-app-compat-1.5.5.jar (com.arello-mobile:moxy-app-compat:1.5.5) and moxy-x-androidx-1.7.0.jar (tech.schoolhelper:moxy-x-androidx:1.7.0)
Duplicate class com.arellomobile.mvp.MvpAppCompatDialogFragment found in modules jetified-moxy-app-compat-1.5.5.jar (com.arello-mobile:moxy-app-compat:1.5.5) and moxy-x-androidx-1.7.0.jar (tech.schoolhelper:moxy-x-androidx:1.7.0)
Duplicate class com.arellomobile.mvp.MvpAppCompatFragment found in modules jetified-moxy-app-compat-1.5.5.jar (com.arello-mobile:moxy-app-compat:1.5.5) and moxy-x-androidx-1.7.0.jar (tech.schoolhelper:moxy-x-androidx:1.7.0)
Duplicate class com.arellomobile.mvp.MvpDelegate found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.MvpFacade found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.MvpPresenter found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.MvpPresenter$Binder found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.MvpProcessor found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.MvpView found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.PresenterBinder found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.PresenterStore found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.PresentersCounter found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.RegisterMoxyReflectorPackages found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.ViewStateProvider found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.presenter.InjectPresenter found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.presenter.PresenterField found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.presenter.ProvidePresenter found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.presenter.ProvidePresenterTag found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.MvpViewState found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.ViewCommand found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.ViewCommands found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.strategy.AddToEndSingleStrategy found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.strategy.AddToEndStrategy found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.strategy.OneExecutionStateStrategy found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.strategy.SingleStateStrategy found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.strategy.SkipStrategy found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.strategy.StateStrategy found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)
Duplicate class com.arellomobile.mvp.viewstate.strategy.StateStrategyType found in modules moxy-1.5.5.jar (com.arello-mobile:moxy:1.5.5) and moxy-x-1.7.0.jar (tech.schoolhelper:moxy-x:1.7.0)

How to resolve this errors?

@victorlapin
Copy link

Don't mix dependencies, add only moxy-x or moxy

@pavelpoley
Copy link
Author

if i add only
implementation 'tech.schoolhelper:moxy-x-androidx:1.7.0'
all classes related to presenters not found

@bitizen248
Copy link

Use should also use custom Moxy
https://github.com/schoolhelper/MoxyX

This worked for me

@fmaxx
Copy link

fmaxx commented Sep 13, 2019

that works on my Android-x project ($versions.moxy = 1.7.0):

 implementation "tech.schoolhelper:moxy-x:$versions.moxy"
 implementation "tech.schoolhelper:moxy-x-android:$versions.moxy"
 annotationProcessor "tech.schoolhelper:moxy-x-compiler:$versions.moxy"

@morozione
Copy link

morozione commented Nov 26, 2019

You can solve the problem by don't add implementation "com.arello-mobile:moxy-app-compat:$moxy" to your project but instead of this you can create your class com.arellomobile.mvp.MvpAppCompatActivity with the code from this repository but with the dependency on androidX and use it as well. Here is come a couple of code:

package com.arellomobile.mvp;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;

@SuppressWarnings("unused")
public class MvpAppCompatActivity extends AppCompatActivity {
    private MvpDelegate<? extends MvpAppCompatActivity> mMvpDelegate;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getMvpDelegate().onCreate(savedInstanceState);
    }

@ShwetaChauhan18
Copy link

ShwetaChauhan18 commented Mar 27, 2020

this works on my Android-x project

  implementation 'tech.schoolhelper:moxy-x:1.7.0'
  implementation 'tech.schoolhelper:moxy-x-androidx:1.7.0'
  kapt 'tech.schoolhelper:moxy-x-compiler:1.7.0'

@VovaStelmashchuk
Copy link
Contributor

VovaStelmashchuk commented Mar 27, 2020

Hi, all
Check a new version of moxy [https://github.com/moxy-community/Moxy](New Moxy).

This repo and repo of tech.schoolhelper are not up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants