can i access the main function from within a file ...
# android
l
can i access the main function from within a file in the
java
directory? if so, how do i do that?
a
If you type, you should be able to see that you can view classes between the Java and kotlin folders. Both should be part of your src directory. In this case, your main function is not static, so you'd need an instance of your class to call it. For an actual main method, you can wrap it in a companion object and label it as jvm static, or write it outside of the class entirely
l
so my issue was i didnt add sourceSets to build.gradle
it now works as expected when i set up a companion object