gradle - Android Studio Export jar not exporting any jar -
i new android studio, , trying export jar out of android studio project unity project.
i followed instruction given on link create android plugin unity using android studio
but whenever i'm trying export showing "build successful" , "external task execution finished 'exportjar'" not able find jar in specified folder of gradle file.
i looked folders "app/release" empty , "app/build/intermediates/bundles/release/" contains folder named "instant-run".
so bit confused whether skipping step or looking on wrong path.
i m using android studio v2.1.2
app.build file
apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion "24.0.0" defaultconfig { applicationid "com.example.merchantapp" minsdkversion 8 targetsdkversion 19 } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:support-v4:22.2.1' compile files('libs/pgsdk_v1.0.jar') compile files('libs/classes.jar') } task deleteoldjar(type: delete) { delete 'release/androidplugin.jar' } //task export contents jar task exportjar(type: copy) { from('build/intermediates/bundles/release/') into('release/') include('classes.jar') ///rename jar rename('classes.jar', 'androidplugin.jar') } exportjar.dependson(deleteoldjar, build) android { lintoptions { abortonerror true } }
you should change line
apply plugin: 'com.android.application'
to
apply plugin: 'com.android.library'
it mandatory. , rebuild project. cause generating library , should required build jar file. reference how export library jar in android studio?
Comments
Post a Comment