0


I am planning to make jar file via Android Studio. The current version I am using is 2.1.2 and I have gone through the link How to make a .jar out from an Android Studio project. This was not helping me. since I tried to generate the jar and found nothing happened.

The thing I did as the link said are

  • created a module name testLib (Android Library -> the reason I chose android library is to make use of common shared library file and permissions for android 6.0)
  • And then I executed createJar and deleteJar in the gradel list.
  • My Module:libtest is as follows
task deleteJar(type: Delete){
    delete 'libs/libtest.jar'
}

task createJar(type: Copy){
    from('build/intermediates/bundeles/release')
    into('libs/')
    include('classes.jar')
    rename('classes.jar','libtest.jar')
}

createJar.dependsOn(deleteJar, build)

The above resulted with empty libs folder

Please help me with a solution. Thanks in ADVANCE

Community
  • 1
  • 1
Narayanan S
  • 113
  • 1
  • 13

1 Answers1

0

You put wrong from location:

from('build/intermediates/bundles/release')

not

from('build/intermediates/bundeles/release')
MsBao
  • 108
  • 9