Where is BuildConfig.DEBUG?
        Posted  
        
            by 
                Ollie C
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ollie C
        
        
        
        Published on 2012-03-22T12:02:25Z
        Indexed on 
            2012/03/22
            23:29 UTC
        
        
        Read the original article
        Hit count: 297
        
android
My project doesn't seem to be aware of this new constant that's apparently auto-generated in Android Tools r17 builds:
"Added a feature that allows you to run some code only in debug mode. Builds now generate a class called BuildConfig containing a DEBUG constant that is automatically set according to your build type. You can check the (BuildConfig.DEBUG) constant in your code to run debug-only functions such as outputting debug logs."
I've confirmed that this class is not being auto-generated anywhere in my project by the new tools. I deleted all project outputs (including all gen folders) and rebuilt, and only R.java classes are being generated.
Why are the tools not generating the BuildConfig class? It may be relevant that I'm using IntelliJ.
© Stack Overflow or respective owner