2

how can i create a jar binary library project in android studio that can be used in other projects (meaning - an sdk)?

if it is possible, i want it to contain both java files and native cpp code (java files will start audio listening and cpp files for analysis).

there is no resources/layouts in the library.

if i add an android library module, its ouput is an aar file and not jar. i read that eclipse does not support aar and so that is why i want it to be jar.

thanks a lot!

dowi
  • 1,005
  • 15
  • 30
  • possible duplicate of [How to make a .jar out from an Android Studio project](http://stackoverflow.com/questions/21712714/how-to-make-a-jar-out-from-an-android-studio-project) – RicoRicochet Jan 13 '15 at 09:18
  • well for now i just use aar... cos it can also contain my native library – dowi Jan 21 '15 at 13:21

2 Answers2

1

What you need to do is to put aside the Android "nature" of Android Studio and just write and build a normal Java/C++ project with Gradle. Your first stops will be Java quickstart and Native support documentation of Gradle.

JBaruch
  • 22,610
  • 5
  • 62
  • 90
0

In gradle find command "createFullJarDebug" This command will generate jar file under build\intermediates\full_jar\debug\createFullJarDebug\full.jar

then you could use it.

OfusJK
  • 676
  • 1
  • 5
  • 13