So I'm needing to create class files in Android Studio so I can use URLClassLoader. I need to do this so that I can pass custom objects through a socket, I keep getting a ClassNotFoundException. I know the conventional way to go about this is to add the object's class to the classpath, but I couldn't figure that out - things I read online seemed to either be outdated, or for a different setup.
I can't see how to create class files, though. When I build an IntelliJ object, the class files get created. But not in AndroidStudio. Why?
If your AS is setup correctly then creating the classes should appear in the AS path. Do you have some more context on the setup of your project so that we can advice further?
Java classes can be created by right-clicking on a Java folder then New > Java Class
A Java folder can be created by right-clicking another folder and selecting New > Folder > Java Folder
The compiled Java class file will be found by going to the module's folder then build > intermediates > classes > debug > company.name > com > app.name