Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module packages not found at compile time in IntelliJ

I'm attempting to setup my Android project in IntelliJ. I've never used it before, and I'm having some problems with module dependencies.

The project depends on several modules, which I have added in the Dependencies tab. IntelliJ detects them (i.e. there are no complaints in the code), but it fails at compile time with "package x.y.z does not exist." I have also tried checking "export" for the modules, but that seems to have no effect.

I saw this question which appears to be the same problem, but there was no solution.

like image 226
Tyler Treat Avatar asked Dec 29 '12 23:12

Tyler Treat


1 Answers

Try adding your src as modules.

  • File > Add Module
  • Create Module from Existing Sources -> your_src_path_top_level
  • Next > Next > Finish
  • File > Project Structure > Modules > YourApp
  • plus button > Module Dependency > your_lib_you_added_earlier
  • Use the up/down arrows to move to the bottom of the list

Here is a visual where I have added the Google Play src as a module.

enter image description here

like image 98
Aaron McIver Avatar answered Sep 29 '22 02:09

Aaron McIver