{"record":{"id":"f2bfcfb104c446c9","repo":"Blankj/AndroidUtilCode","slug":"no-busutils-of-ext-busutilsclass-in-mproject","errorCode":null,"errorMessage":"No BusUtils of ${ext.busUtilsClass} in $mProject.","messagePattern":"No BusUtils of (.+?) in \\$mProject\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"plugin/bus-gradle-plugin/src/main/java/com/blankj/bus/BusPlugin.groovy","lineNumber":130,"sourceCode":"                Map busDetails = [:]\n                busDetails.put(\"BusUtilsClass\", ext.busUtilsClass)\n                busDetails.put(\"rightBus\", rightBus)\n                busDetails.put(\"wrongBus\", wrongBus)\n                String busJson = JsonUtils.getFormatJson(busDetails)\n                log(jsonFile.toString() + \": \" + busJson)\n                FileUtils.write(jsonFile, busJson)\n\n                if (wrongBus.size() > 0) {\n                    if (ext.abortOnError) {\n                        throw new Exception(\"These buses is not right: \" + wrongBus +\n                                \"\\n u can check it in file: \" + jsonFile.toString())\n                    }\n                }\n\n                BusInject.start(busMap, busUtilsTransformFile, ext.busUtilsClass)\n            }\n        } else {\n            throw new Exception(\"No BusUtils of ${ext.busUtilsClass} in $mProject.\")\n        }\n    }\n}","sourceCodeStart":112,"sourceCodeEnd":133,"githubUrl":"https://github.com/Blankj/AndroidUtilCode/blob/7b4caf9e5440046b3fefb63b6b6e2ead7ebaf809/plugin/bus-gradle-plugin/src/main/java/com/blankj/bus/BusPlugin.groovy#L112-L133","documentation":"BusPlugin sets busUtilsTransformFile only in scanClassFile(), when it encounters a class whose name equals busUtilsClass. In onScanFinished(), if busUtilsTransformFile is still null (the class was never seen), it throws Exception. There is nothing to inject the event registry into, so the build cannot proceed.","triggerScenarios":"busUtilsClass names a class not present on the app's compiled classpath; the BusUtils class lives in a jar excluded by onlyScanLibRegex/jumpScanLibRegex; the utilcode dependency is not actually pulled in; the FQN has a typo or wrong package.","commonSituations":"Configured busUtilsClass \"com.xxx.xxx.BusUtils\" for a custom copy but the dependency providing it is missing; forgot to add api \"com.blankj:utilcode:...\"; the BusUtils jar is filtered out by a scan regex.","solutions":["Ensure the dependency providing busUtilsClass is on the app classpath, e.g. api 'com.blankj:utilcode:latest.release'.","Verify busUtilsClass exactly matches the FQN of the BusUtils class present (correct package, no typo).","If using onlyScanLibRegex/jumpScanLibRegex, make sure the jar/module containing BusUtils is not excluded (utilcode is never skipped by isIgnoreScan)."],"exampleFix":"// before - busUtilsClass names a class not on the classpath\nbus { busUtilsClass \"com.example.MyBusUtils\" }   // missing -> \"No BusUtils of ...\"\n\n// after - provide the dependency / correct class\ndependencies { api 'com.blankj:utilcode:latest.release' }\nbus { busUtilsClass \"com.blankj.utilcode.util.BusUtils\" }   // or omit the block","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include the dependency that hosts the configured BusUtils class (utilcode by default).","Double-check the busUtilsClass FQN against the actual class package/name.","Avoid scan-regex rules that would exclude the jar containing BusUtils."],"tags":["gradle-plugin","bus","build","dependency","asm"],"backgroundTag":null,"analyzedSha":"7b4caf9e5440046b3fefb63b6b6e2ead7ebaf809","analyzedAt":"2026-08-14T02:26:54.956Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}