Android和Unity3D之导出jar包(二)
2018-07-12 本文已影响54人
茶杯里的阳光
打开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
