aeroxr1
aeroxr1

Reputation: 1074

Jar library vs Android Library. Which is the difference?

I have a doubt : Jar library vs Android Library

Which is the difference ?

In jar library I can't use Android's methods, but I can only use java's functions; right ? (for example I can't use the android's method for Json)

EDIT : I have read the below answer and I have understood that I can use Android SDK inside the JAR file. The question is : How can I use method from Android SDK in a JAR file ?

Thus if I want to use a library's function to write on my webview, I think is better that I use the Android Library. Is it Right or I commit some mistake in my reasoning ?

Upvotes: 1

Views: 712

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006539

Which is the difference ?

Quoting the documentation, with emphasis added:

An Android library module is a development module that holds shared Android source code and resources.

An Android library module (formerly known as an Android library project) also supports packaging assets, NDK libraries, and manifest entries, whereas a plain JAR does not.

In jar library I can't use Android's methods, but I can only use java's functions; right ?

No, you can create a JAR that uses classes and methods from the Android SDK.

Upvotes: 2

Related Questions