How to create an inclusive aar file in Android?

How do you integrate a .jar file into an Android app?

  • I have a .jar file and the associated .java and .class files.  What I want to do is create an Android app (I'm using Eclipse) and  somehow integrate the .jar file with it. The .jar file acts as a  Spellchecker and I want to create a Spellchecker app, so how should I go  about doing this? I know I will have to make changes, of course, but is  this possible?

  • Answer:

    First of all, not all Java SE APIs that are called by third-party jars exist on Android, or if they do, work exactly the same. Next, it's better to include the source code into your source tree, rather than copying the jar to the libs folder. This way, the tools such as  lint can have a look at it - http://developer.android.com/tools/debugging/improving-w-lint.html

Miguel Paraz at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.