{"record":{"id":"609664cd1b73d329","repo":"alibaba/ARouter","slug":"logisticscenterarouter-init-logistics-center-excep","errorCode":null,"errorMessage":"LogisticsCenterARouter init logistics center exception! [<failure>]","messagePattern":"LogisticsCenterARouter init logistics center exception! \\[<failure>\\]","errorType":"exception","errorClass":"HandlerException","httpStatus":null,"severity":"critical","filePath":"arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java","lineNumber":207,"sourceCode":"                        ((IInterceptorGroup) (Class.forName(className).getConstructor().newInstance())).loadInto(Warehouse.interceptorsIndex);\n                    } else if (className.startsWith(ROUTE_ROOT_PAKCAGE + DOT + SDK_NAME + SEPARATOR + SUFFIX_PROVIDERS)) {\n                        // Load providerIndex\n                        ((IProviderGroup) (Class.forName(className).getConstructor().newInstance())).loadInto(Warehouse.providersIndex);\n                    }\n                }\n            }\n\n            logger.info(TAG, \"Load root element finished, cost \" + (System.currentTimeMillis() - startInit) + \" ms.\");\n\n            if (Warehouse.groupsIndex.size() == 0) {\n                logger.error(TAG, \"No mapping files were found, check your configuration please!\");\n            }\n\n            if (ARouter.debuggable()) {\n                logger.debug(TAG, String.format(Locale.getDefault(), \"LogisticsCenter has already been loaded, GroupIndex[%d], InterceptorIndex[%d], ProviderIndex[%d]\", Warehouse.groupsIndex.size(), Warehouse.interceptorsIndex.size(), Warehouse.providersIndex.size()));\n            }\n        } catch (Exception e) {\n            throw new HandlerException(\n                    TAG + \"ARouter init logistics center exception! [\" + describeFailure(e) + \"]\",\n                    e\n            );\n        }\n    }\n\n    /**\n     * Build postcard by serviceName\n     *\n     * @param serviceName interfaceName\n     * @return postcard\n     */\n    public static Postcard buildProvider(String serviceName) {\n        RouteMeta meta = Warehouse.providersIndex.get(serviceName);\n\n        if (null == meta) {\n            return null;\n        } else {","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/alibaba/ARouter/blob/84f451d244e3fb1d0e37801de1b9ee2af2f81d68/arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java#L189-L225","documentation":"LogisticsCenter.init() loads ARouter's route/interceptor/provider indexes into Warehouse and wraps any unexpected exception in a HandlerException prefixed with the LogisticsCenter tag. The [<failure>] part (describeFailure(e)) carries the underlying cause description so you know which generated class or scan step failed.","triggerScenarios":"Any Exception during init: a UniqueKeyTreeMap duplicate-route throw, ClassNotFoundException for a listed route/interceptor/provider class, InstantiationException/IllegalAccessException when instantiating providers, or IO errors reading generated group files.","commonSituations":"ProGuard/R8 stripping or renaming generated route classes; mixed ARouter compiler versions producing incompatible metadata; a provider class without a public no-arg constructor; duplicate route paths across modules.","solutions":["Read the nested failure in [<failure>]/cause and fix the specific root cause (duplicate path, missing class, etc.)","Add ARouter-generated classes to ProGuard keep rules: -keep class * extends com.alibaba.android.arouter.facade.* and keep @Route/@Autowired annotated classes","Align arouter-api, arouter-compiler and arouter-annotation versions across all modules; run gradle clean","Ensure provider classes declared in @Route have a public default constructor"],"exampleFix":"// before (proguard-rules.pro)\n# (no ARouter rules)\n// after\n-keep class com.alibaba.android.arouter.routes.** { *; }\n-keep @com.alibaba.android.arouter.facade.annotation.Route class * { *; }\n-keep class * implements com.alibaba.android.arouter.facade.template.IProvider { *; }","handlingStrategy":"try-catch","validationCode":"// preflight: ensure ARouter deps and generated classes exist\nif (!checkClassPresent(\"com.alibaba.android.arouter.routes.ARouter$$Group$$app\")) {\n    Log.e(TAG, \"ARouter generated classes missing; check compiler plugin + proguard\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    ARouter.init(application);\n} catch (HandlerException e) {\n    Log.e(TAG, \"ARouter init failed: \" + e.getMessage(), e.getCause());\n    // degrade: fall back to explicit Intent navigation\n}","preventionTips":["Add ARouter proguard keep rules for release builds","Pin identical arouter-api/compiler/annotation versions in all modules","Run gradle clean before release builds","Give IProvider classes public default constructors"],"tags":["arouter","init","reflection","proguard"],"backgroundTag":"module-init-failed","analyzedSha":"84f451d244e3fb1d0e37801de1b9ee2af2f81d68","analyzedAt":"2026-09-06T13:30:41.084Z","contentChangedAt":"2026-09-06T13:30:41.084Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}