Skip to content Skip to sidebar Skip to footer

.jar File Not Generating In Android Studio

I'm working project which requires another project's .jar file. I'm using android studio 2.3.3. Following is code to generate .jar file task clearJar(type: Delete) { delete 'build/

Solution 1:

I was facing the same problem earlier, I resolved it by clearing invalidated cache and restart studio.

Go to file -> Invalidate caches and restart. It will take time.


Solution 2:

On Android studio 3.1+ the build path got changed. So change the path to "build/intermediates/packaged-classes/release/". May it help some one.

task makeJar(type: Copy)
{
    from('build/intermediates/packaged-classes/release/')
    into('build/outputs/')
    include('classes.jar')
    rename ('classes.jar', 'NAME.jar')
}

Solution 3:

Add this line into your app build.gradle file under the dependencies.

implementation fileTree(include: ['*.jar'], dir: 'libs')


Post a Comment for ".jar File Not Generating In Android Studio"