Coder Social home page Coder Social logo

多个module 跳转问题 about activityrouter HOT 7 OPEN

mzule avatar mzule commented on May 1, 2024
多个module 跳转问题

from activityrouter.

Comments (7)

liy452083759 avatar liy452083759 commented on May 1, 2024 2

annotationProcessor 'com.github.mzule.activityrouter:compiler:1.1.7'
在主app和module里面都需要配置这个属性

from activityrouter.

yangchun9525 avatar yangchun9525 commented on May 1, 2024

你是不是moduleA,B中没有写module类,主项目中的的module类为AppModule

from activityrouter.

totothink avatar totothink commented on May 1, 2024

@Cuieney @yangchun9525 应该是没有加module类, 我也碰到相同的问题,加类后可以使用。

在App module中额外加入AppModule类,用@module声明

@Module("app")
public class AppModule {
}

在moduleA中额外加入ModuleA类,用@module声明

@Module("modulea")
public class ModuleA {
}

在App类中用@modules声明

@Modules({"app", "modulea"})
public class App extends Application implements RouterCallbackProvider{
  ...
}

from activityrouter.

liy452083759 avatar liy452083759 commented on May 1, 2024

这样做了之后发生这个异常
java.lang.NoClassDefFoundError: com.github.mzule.activityrouter.router.RouterInit

from activityrouter.

monsterLin avatar monsterLin commented on May 1, 2024

@liy452083759 请问现在你的这个问题解决了么,今天组件化集成Router,出现了你的这个问题

from activityrouter.

Cuieney avatar Cuieney commented on May 1, 2024

from activityrouter.

monsterLin avatar monsterLin commented on May 1, 2024

@Cuieney 我是按照官网的配置来的,结果出现那个问题...

from activityrouter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.