0

Sorry for my English. I am new in android. How to export jar file using the android studio. I searched some code. Here the code:

task deleteJar(type: Delete) {
   delete 'release/libss.jar'
}

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

 createJar.dependsOn(deleteJar, build)

I will try that code but jar file not created in the specfic location only empty folder .

Its not work for me.......... Please help me.

1 Answers1

0

First,Build, Select build variants and you can change the app's build variant. to release. Second, you might use like this code to gradl look the path "from" carefully. and set the path include 'classes.jar' Wish it could be help..