I had run this flutter build apk
to release my App. Now I had build verison 2 of that.
Now again I want to release my version 2 App.To get the release apk
you can change in local.properties android project
sdk.dir=D:/SDK //your android SDK location
flutter.sdk=D:\\Flutter\\flutter //your flutter SDK location
flutter.versionName=1.0.0
flutter.versionCode=2
flutter.buildMode=release
changes in your android/app/build.gradle file
buildTypes {
release {
// if everything ok then not add
//minifyEnabled true
//another you can remove minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-
android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
you can also changes in android/app/build.gradle defaultConfig method body.
multiDexEnabled true
if you want to migrate to androidx then do it setup.
dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' implementation 'androidx.multidex:multidex:2.0.1'
}
and clean before create build folder by following this cmd.
- flutter clean
- flutter build apk --release
- flutter install
6.Release Apk location.
in `android studio termial` or inside `project-root` you can navigate to this.
cd build\app\outputs\apk\release