BuildConfig file in android – Purpose and Possibilities-ThrowExceptions

Exception or error:

Android has a flag called DEBUG in BuildConfig.java. Can someone please explain how is this file created? What is the purpose of having an auto-generated file with a single variable in it?

Is it possible to have something besides DEBUG flag inside this class? What if I want a configuration other than development and release configuration? How can I achieve it?

How to solve:

BuildConfig.java is generated automatically by Android build tools, and is placed into the gen folder.

Read more here:
http://www.digipom.com/be-careful-with-buildconfig-debug/

You can customizing Your Build With Gradle:
http://toastdroid.com/2014/03/28/customizing-your-build-with-gradle/

Leave a Reply

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