Reputation: 1465
I have a normal Java library project, called "PeriodicLib2", and an Android app project, called PeriodicApp2. Both are Intelij-Idea projects. I'm not using any build system, only what Idea has build-in.
I want PeriodicApp2 to depend on PeriodicLib2. I don't want to build my library project and add is as a library jar file, because I'm changing the library's code really frequent, and I would like the Android project to automatically build the library. I got something similar working, a java project depending on another java project. But when an android project depending on a java project, I get compile-time errors. These are the steps I tried to get PeriodicApp2 to depend on PeriodicLib2:
I can import and use the classes in PeriodicLib2 according to the idea auto-completion, but when I compile, I get the following compile/build error:
I have been searching on Google & asking on #java, but I couln't find any solution. How can I get an Android project to depend on a pure Java project?
Upvotes: 0
Views: 78
Reputation: 111
Library dependencies should be .jar files, if you want to add a dependency that consist of source code files, you can try to add it to your project as a module (import module), and add it as a module dependency to your PeriodicApp2 module.
Upvotes: 1