In Android studio in the "module settings" in the Dependencies tab you can select a scope for your library files. What is the difference between "compile" and "provided"?
The compileOnly configuration is used to itemize a dependency that you need to compile your code, same as compile above. The difference is that packages your java code use from a compileOnly dependency will not be listed as Import-Package manifest entries.
compileOnly dependencies are available while compiling but not when running them. This is equivalent to the provided scope in maven. It means that everyone who wants to execute it needs to supply a library with all classes of the CompileOnly library.
compile
includes the library in your final APK, while provided
doesn't; provided
is a compile-time-only dependency.
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