How to run release variant of app and enable logcat while running Release build of application

Updated 21 February 2018

Save

In this small blog, we will discuss how to run the release Variant of the app and enable logcat while running release app.

After the successful build the application we have to test that app very well for the application stability. In general, you should focus your Android tests on testing the business logic of your application. A good rule of thumb is to have the following distribution of tests:

we can see that the max percentage of the application testing is the unit testing which is done on code basis or we can say that the developer side.

It is good practice in Android testing to test the release version of the application instead of the debug version of Application.

How to run the release Variant of the app

Follow the below steps,

  1. First, select the build variant to Release,

    Then run the application, then an edit configuration screen will be Open.

  2. At the bottom of that screen, an error will be shown, and the right of that error an fix button will be shown, we have to click on that fix button,
  3. After clicking that fix button, then the project structure window will be opened,
    then you have to click on plus sign to add the signing configuration,


    Select your key store path, and fill that form.

  4. After filled that form go to flavor tab just right of current tab(signing), select you created signing config. Then simply click ok.
  5. After all this, your work is finished now. The Project is now syncing. After successfully sync there will be shown the signing config to build.gradle, and in your default config or selected flavor there will be a line of signing config added,

 

Now you can run your release application directly in your device without generation of the signed apk.

Enable logcat while running Release build of application

Follow the below simple steps,

  1. Add the android:debuggable in AndroidManifest.xml
  2. And then add the checkReleaseBuilds false in build.gradle,

Now you have successfully enable the logcat while running release version of the app.

Note: After completing the test don’t forget to remove or comment above block of code.

Thanks for read this blog, may be this is help full to you. Stay cool and Stay updated.

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home