Dagger2 Error :component depends on scoped component in a non-hierarchical scope ordering
<p>Can someone help me to resolve this issue, I'm trying to add dagger2 to my application getting this scope issue. </p>

<pre><code>Error:(14, 1) error: com.bmx.presentation.authentication.login.LoginComponent depends on scoped components in a non-hierarchical scope ordering:
@com.bmx.di.scope.ActivityScope com.bmx.data.remote.AuthenticationRepositoryComponent
@com.bmx.di.scope.ActivityScope com.bmx.presentation.authentication.login.LoginComponent


@Module
public class AppModule {
  private Application mApplication;
    public AppModule(Application mApplication) {
        this.mApplication = mApplication;
    }

    @Provides
    @Singleton
    Application provideApplication() {
        return mApplication;
    }

    @Provides
    @Singleton
    public Resources provideResources(Context context) {
        return context.getResources();
    }
}
---------------------------------
@Module
public class NetModule {
    String mBaseUrl;

    public NetModule(String mBaseUrl) {
        this.mBaseUrl = mBaseUrl;
    }
    @Provides
    @Singleton
    Cache provideHttpCache(Application application) {
        int cacheSize = 10 * 1024 * 1024;
        Cache cache = new Cache(application.getCacheDir(), cacheSize);
        return cache;
    }
    @Provides
    @Singleton
    Gson provideGson() {
        GsonBuilder gsonBuilder = new GsonBuilder();
        gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES);
        return gsonBuilder.create();
    }
    @Provides
    @Singleton
    OkHttpClient provideOkhttpClient(Cache cache) {
        OkHttpClient.Builder client = new OkHttpClient.Builder();
        client.cache(cache);
        return client.build();
    }
    @Provides
    @Singleton
    Retrofit provideRetrofit(Gson gson, OkHttpClient okHttpClient) {
        return new Retrofit.Builder()
                .addConverterFactory(GsonConverterFactory.create(gson))
                .baseUrl(mBaseUrl)
                .client(okHttpClient)
                .build();
    }
    @Provides
    @Singleton
    public BmxRestService provideBmxRestService(Retrofit retrofit) {
        return retrofit.create(BmxRestService.class);
    }
}
---------------------------------------------
@Singleton
@Component(modules = {NetModule.class,AppModule.class})
public interface ApiComponent {
    BmxRestService getBmxRestService();
    Application getApplication();
}
-----------------------------------------------------
public interface AuthenticationRepository {
   Observable&lt;List&lt;UserProfile&gt;&gt; doLogin(String userName, String password);

   Observable&lt;List&lt;UserProfile&gt;&gt; doSignUp(String firstName, String lastName,String email,String password);

}
--------------------------------------------------------------
public class AuthenticationRepositoryImpl implements AuthenticationRepository {
        private BmxRestService BmxRestService;
        @Inject
        public AuthenticationRepositoryImpl(@NonNull final BmxRestService BmxRestService) {
            this.BmxRestService = BmxRestService;
        }
     //implementation
}
-------------------------------------------
@ActivityScope
@Module
public class AuthenticationRepositoryModule {
    @Provides
    @ActivityScope
    public AuthenticationRepository provideAuthenticationRepository(BmxRestService BmxRestService) {
        return new AuthenticationRepositoryImpl(BmxRestService);
    }
}
-----------------------------
@ActivityScope
@Component(modules = {AuthenticationRepositoryModule.class},dependencies = ApiComponent.class)
public interface AuthenticationRepositoryComponent {
    AuthenticationRepository getAuthenticationRepository();
}
-----------------------------------
@Module
public class LoginPresenterModule {

    private final LoginContract.View mView;

    public LoginPresenterModule(LoginContract.View mView) {
        this.mView = mView;
    }

    @Provides
    @ActivityScope
    LoginContract.View provideLoginContractView(){
        return this.mView;
    }

}
----------------------------------------------

@ActivityScope
@Component(dependencies = AuthenticationRepositoryComponent.class, modules = LoginPresenterModule.class)
public interface LoginComponent {
    void inject(LoginActivity activity);
}

----------------------------------------
public class LoginPresenter extends BasePresenter&lt;LoginContract.View&gt; implements LoginContract.Presenter{

    private  Scheduler mainScheduler, ioScheduler;

    private  AuthenticationRepository mAuthenticationRepository;

    @Inject
    public LoginPresenter(@NonNull final AuthenticationRepository authenticationRepository,@NonNull final LoginContract.View loginView) {
        super(loginView);
        this.mView  =loginView;
        this.mAuthenticationRepository =authenticationRepository;
        this.mainScheduler = AndroidSchedulers.mainThread();
        this.ioScheduler = Schedulers.io();
    }
  //implementation

}

----------------------
public class LoginActivity extends AppCompatActivity implements LoginContract.View {

    private static final String TAG = "LoginActivity";

    @Inject
    LoginPresenter mLoginPresenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
  }
}
-----------------------
public class BmxApp extends Application {

    private ApiComponent apiComponent;

    @Override
    public void onCreate() {
        super.onCreate();
        initializeNetComponent();
    }

    private void initializeNetComponent() {
        apiComponent =   DaggerApiComponent.builder().netModule(new NetModule(BuildConfig.BASEURL)).appModule(new AppModule(this)).build();
    }

    public ApiComponent getApiComponent() {
        return apiComponent;
    }

}

---------------
@Documented
@Scope
@Retention(RetentionPolicy.RUNTIME)
public @interface ActivityScope {
}
</code></pre>