what are the differences between Java library and android library and what advantages/disadvantages has each?
To use a Java library (JAR file) inside your Android project, you can simple copy the JAR file into the folder called libs in your application. *. jar files in this folder are included into the compile classpath via the default build.
What is the difference between Android and Java? Java is a programming language, while Android is a mobile phone platform. Android development is java-based (most of the times), because a large portion of Java libraries is supported in Android.
An Android library is structurally the same as an Android app module. It can include everything needed to build an app, including source code, resource files, and an Android manifest.
The main difference is aar is splitted inside android to jar. If your app will be used only in user app only in android studio then aar is preferred. If you are planning for app to communicate with c/c++ compiled lib.so file jar is preferred.
You can include standard Java .jar file libraries in an Android app. They are translated into Dalvik format at .apk build time.
There is an Android Library system which allows the use of shared resources such as layouts and localized strings. As that has more restrictions that regular Java libraries I'd only recommend this method if you actually need to share resources.
http://developer.android.com/guide/developing/projects/projects-eclipse.html
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