Android Studio – How to ZipAlign apk

Inside you main module’s build.gradle file you can have multiple build types along with your debug one. You can specify zipAlign characteristic inside any of your buildType by using buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.txt’ zipAlignEnabled true } } Note: Older versions use zipAlign, instead of zipAlignEnabled Default gradle tasks always created … Read more

Change apk name with Gradle

As CommonsWare wrote in his comment, you should call appendVersionNameVersionCode only for staging variants. You can easily do that, just slightly modify your appendVersionNameVersionCode method, for example: def appendVersionNameVersionCode(variant, defaultConfig) { //check if staging variant if(variant.name == android.buildTypes.staging.name){ if(variant.zipAlign) { def file = variant.outputFile def fileName = file.name.replace(“.apk”, “-” + defaultConfig.versionName + “-” + defaultConfig.versionCode … Read more

How to zipalign the apk file in Windows

Make sure you have the Android SDK build-Tools installed then check where your SDK is installed mine was at C:\Program Files(x86)\Android\android-sdk\build-tools\23.0.1\zipalign You will find zipAlign in the android build tools then use it like so: C:\Program Files(x86)\Android\android-sdk\build-tools\23.0.1\zipalign -v 4 infile.apk outfile.apk Usage To align infile.apk and save it as outfile.apk: zipalign [-f] [-v] <alignment> infile.apk … Read more

How to generate an .apk file from Xamarin.Forms Project using Visual Studio?

When using Visual Studio 2015 Update 3 with the latest Xamarin tools (which is v4.2.2.6 when writing this answer), right click your Android project and select “Archive…” as described here: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/part_1_-_preparing_an_application_for_release/#Compile This will open the Archive Manager and begins the process of archiving the App bundle. When the archiving is finished, you can click on … Read more

Android studio 3.0 does not generate signed apk

Since Android Studio 3.0 update, the apk generated will be in {project-folder}/app/release/app-release.apk Also 1 more file is generated Output.json which holds the apk generation details. Sample: [ { “outputType”:{ “type”:”APK” }, “apkInfo”:{ “type”:”MAIN”, “splits”:[ ], “versionCode”:1 }, “path”:”app-debug.apk”, “properties”:{ “packageId”:”njscommunity.xxxxx”, “split”:””, “minSdkVersion”:”19″ } } ] All depends on Gradle build, so at the end it … Read more

Google play, I accidentally uploaded production APK, now can’t do beta testing

I contacted google play support. And yes, if you accidentally upload to production, you can no longer test. This was their response: Thanks for contacting Google Play about removing a published Production APK. We don’t currently support the functionality you’re requesting. In this case, you would need to unpublish the current app and then publish … Read more

React Native: Generate .apk and .ipa using Expo

make sure in app.json { “expo”: { “name”: “your app name”, “description”: “your app desc”, …., “ios”: { “supportsTablet”: true }, “android”: { “package”: “com.yourcompany.yourappname” } } } then run expo build:android or expo ba after that run expo build:status you’ll find, something like this, the Apk’s is hosted on amazon aws [exp] Android: [exp] … Read more

Multiple Android Application Package .apk files from single source code

I’m generating 2 different APK’s (demo and production) from one single source tree with 3 small modifications: 1) I have public static final DEMO=true; //false; in my Application class and depending on that value I used to switch code between demo/production features 2) There are 2 main activities, like: package mypackage; public class MyProduction extends … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)