打开build.gradle
代码如下
task deleteOldJar(type: Delete) {
delete 'build/libs/myclasses.jar'
}
task exportJar(type: Copy) {
from('build/intermediates/bundles/release')
into('build/libs/')
include('classes.jar')
rename('classes.jar', 'myclasses.jar')//直接生成myclasses.jar就可以获取
}
exportJar.dependsOn(deleteOldJar, build)
点击export jar 生成jar包
然后去目录下找到 指定jar文件
右键到处 交给unity