AS 打包jar 报Cannot expand ZIP*******class.jar as it does not exist

Record it


> Task :***********:copyJar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':*********:copyJar'.
> Cannot expand ZIP 'E:\*****\*****\*****\*****\*****\build\intermediates\bundles\release\classes.jar' as it does not exist.

 

Here it is said that classes.jar does not exist, because the location of classes.jar has changed because of the AndroidStudio version.

My current version is found in the packaged-classes\release class

libRelease was renamed by itself, it turned out to be release

Put

def zipFile = file('build/intermediates/bundles/libRelease/classes.jar')

Replace with

def zipFile = file('build/intermediates/packaged-classes/libRelease/classes.jar')

That's it

Guess you like

Origin blog.csdn.net/congcongguniang/article/details/107484125