diff --git a/router-api/src/main/java/com/lzh/nonview/router/tools/Cache.java b/router-api/src/main/java/com/lzh/nonview/router/tools/Cache.java index 441acb0..69339ca 100644 --- a/router-api/src/main/java/com/lzh/nonview/router/tools/Cache.java +++ b/router-api/src/main/java/com/lzh/nonview/router/tools/Cache.java @@ -95,9 +95,13 @@ private static void obtainRouteRulesIfNeed() { creatorRouteMap.clear(); int count = creatorList == null ? 0 : creatorList.size(); for (int i = 0; i < count; i++) { - addAll(activityRouteMap, creatorList.get(i).createActivityRouteRules()); - addAll(actionRouteMap, creatorList.get(i).createActionRouteRules()); - addAll(creatorRouteMap, creatorList.get(i).createCreatorRouteRule()); + try { + addAll(activityRouteMap, creatorList.get(i).createActivityRouteRules()); + addAll(actionRouteMap, creatorList.get(i).createActionRouteRules()); + addAll(creatorRouteMap, creatorList.get(i).createCreatorRouteRule()); + } catch (AbstractMethodError error) { + // ignore 兼容早期没有createCreatorRouteRule的结构 + } } shouldReload = false; } diff --git a/sample/build.gradle b/sample/build.gradle index 81b5200..75adaed 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -29,11 +29,11 @@ android { def parceler_version="1.4.0" def router_version="2.8.4" -def butterknife_version='8.8.1' +def butterknife_version='8.0.1' dependencies { api fileTree(include: ['*.jar'], dir: 'libs') - api 'com.alibaba:fastjson:1.2.35' - api 'com.github.yjfnypeu:EasyAndroid:1.0.3' + api 'com.alibaba:fastjson:1.2.47' + api 'com.github.yjfnypeu:EasyAndroid:1.2.4' api "com.jakewharton:butterknife:$butterknife_version" kapt "com.jakewharton:butterknife-compiler:$butterknife_version" @@ -41,6 +41,9 @@ dependencies { kapt "com.github.yjfnypeu.Parceler:compiler:$parceler_version" api "com.github.yjfnypeu.Parceler:api:$parceler_version" + kapt "com.github.longshihan1.AopBrocad:broca-compiler:1.1.7" + api 'com.github.longshihan1.AopBrocad:broca-api:1.1.7' + // api "com.github.yjfnypeu.Router:router-api:$router_version" // kapt "com.github.yjfnypeu.Router:router-compiler:$router_version"