Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No release bundle folder after upgrading Android Studio

I recently upgraded my Android Studio to version 2.3 with the corresponding gradle version.

I have two modules inside my project, which i exported as a jar using gradle functions like this:

task createJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('libs/')
include('classes.jar')
rename('classes.jar', 'myExample.jar')
}
createJar.dependsOn(deleteJar, build)
  • However after the upgrade, this does not work anymore. In Android Studio i set the Build Variant to "Release", but after running my tasks there will be no JAR in my lib folder. I checked the build/intermediates/bundles/ folder and theres no release folder generated. There will be just a default and a debug folder.

  • Any way to get an external JAR from a release build again?

like image 270
FelRPI Avatar asked Mar 27 '17 06:03

FelRPI


People also ask

Where the AAB file is located in Android Studio?

The aab file is only in debug folder eventhough already choose release when want to generate sign bundle. This is the path where my project's app. aab files genereated --> Project_path/app/build/outputs/bundle/release.

Where to find build Gradle file in Android Studio?

The top-level build.gradle file, located in the root project directory, defines dependencies that apply to all modules in your project. By default, the top-level build file uses the plugins block to define the Gradle dependencies that are common to all modules in the project.

Is Gradle installed with Android Studio?

Android Studio comes with a working installation of Gradle, so you don't need to install Gradle separately in that case. In order to create a new build or add a Wrapper to an existing build, you will need to install Gradle according to these instructions.


1 Answers

Not sure if this is the proper solution but I added this to my gradle file within the android section and the release folder has returned.

publishNonDefault true
like image 88
datsun80 Avatar answered Oct 15 '22 13:10

datsun80