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

无法识别 路由咋回事 #64

Closed
xiejinsorry opened this issue Dec 12, 2017 · 11 comments
Closed

无法识别 路由咋回事 #64

xiejinsorry opened this issue Dec 12, 2017 · 11 comments

Comments

@xiejinsorry
Copy link

  1. 初始化
    Router.initialize(new Configuration.Builder()
    .setDebuggable(BuildConfig.DEBUG)
    .registerModules("app", "easeui")
    .build());
    2.给Acitivity 添加注解
    @route("cartondetail")
    3.在一个工具类里面跳转
    Intent intent = Router.build("cartondetail").getIntent(context);
    intent.putExtra("feed_id", id);
    context.startActivity(intent);
    有什么问题吗? 为什么找不到这个路由呢?
@chenenyu
Copy link
Owner

chenenyu commented Dec 12, 2017

是否忘记在build.gradle中传入注解处理器的参数? 可以参考下demo的配置

android {
    defaultConfig {
        ...
        javaCompileOptions {
            annotationProcessorOptions {
                arguments = ["moduleName": project.name]
            }
        }
    }
}

@xiejinsorry
Copy link
Author

两个地方都加了 一个在 依赖的lib 一个在 app 里面加了 javaCompileOptions {
annotationProcessorOptions {
arguments = ["moduleName": project.name]
}
}

@xiejinsorry
Copy link
Author

lib 名字叫 easeui 主工程module 名字就叫app
Router.initialize(new Configuration.Builder()
.setDebuggable(BuildConfig.DEBUG)
.registerModules("app", "easeui")
.build());

@xiejinsorry
Copy link
Author

studio 是 3.0 没有使用butterknife或者lambda

@xiejinsorry
Copy link
Author

折腾你这 个 sdk 一下午了 还是不行

@chenenyu
Copy link
Owner

支持任意版本,你可以跑一下demo看看,也可以加群,贴图解答

@xiejinsorry
Copy link
Author

我这是什么情况?

@chenenyu
Copy link
Owner

编译过程和初始化过程都有log,我现在没法分析,可以加群贴上log看看

@xiejinsorry
Copy link
Author

Can not find an Activity that matches the given uri: cartondetail 这是log

@xiejinsorry
Copy link
Author

There is no InterceptorTable in module: app.
12-12 17:38:16.751 5689-5689/com.htgames.animesama I/Router: There is no InterceptorTable in module: easeui.

@LiuC520
Copy link

LiuC520 commented Dec 27, 2017

我知道啥问题了,我也遇到了同样的问题,你在settings.gradle中添加你的所有的module,include ':app', ':easeui';然后还要在app的build.gradle中compile compile project(':easeui'),然后应该就行了,我也是这个问题,解决了

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

No branches or pull requests

3 participants