Skip to content

Commit

Permalink
Fix abstractMethodError for new route creator api
Browse files Browse the repository at this point in the history
  • Loading branch information
yjfnypeu committed Nov 16, 2018
1 parent bacd9d2 commit 41ab27d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 7 additions & 3 deletions router-api/src/main/java/com/lzh/nonview/router/tools/Cache.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
9 changes: 6 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,21 @@ 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"

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"

Expand Down

0 comments on commit 41ab27d

Please sign in to comment.