Is it possible to compile a .java file without having the necessary dependencies (the compiler swears by default)? And .smali?
Theoretically, it is quite possible. The .class file still does not know anything about the classes, methods, etc., on which it depends, it simply refers to them. We can create an html page with hyperlinks leading in 404, and the IDE will not prevent us from saving it, and browsers will render it, and problems will only occur if you try to follow the link. And no one thinks it is illogical.
All this is needed in order to quickly correct the code of the decompiled / disassembled application, "save" back, and test. Without wasting too much time with other modules - and disassembling them from class to smali.