android-studio - Android Studio Module依赖
天蓬老师
天蓬老师 2017-04-18 09:14:10
0
3
367

主工程里面导入了一个jar:

compile files('libs/glide-3.7.0.jar')

而另外一个模块也需要用到这个jar,怎么办?
网上说,要用:

provided files('libs/glide-3.7.0.jar')

然后,编译的时候报错了,找不到这个Jar包....

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
Ty80

Of course I can’t find this jar package, and the path is wrong.
Generally, libraries with basic functions like this will be extracted into a module, and then each module will depend on it.
For example: network loading, image loading, log printing, some tool classes, etc. can be extracted into a basic modulemodule, and finally other modules depend on this module.

阿神

After importing it into the main project, if other modules have dependencies on the main project, they can be used directly without repeated imports

左手右手慢动作

Why not use this form

 compile 'com.github.bumptech.glide:glide:3.7.0'
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template