I use IDEA. My gradle config is this:

The point is compile fileTree(dir: 'libs', include: ['*.jar']).
And this is my project structure:

Then I found compile fileTree is not working when java file is in module 'main', but when the java file is under main project, it is working.
How can I get the config valid on module 'main'?
Oh,god!I know why. NOTE: "dir" is relative to the project root, if you add the dependencies to your android project, 'libs' would need to be in the android/ directory. If you added the dependencies in the core project, 'libs' would need to be in the core/ directory.
So,the libs must in module "main",then is done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With