Where is BuildConfig.DEBUG?

后端 未结 4 904
闹比i
闹比i 2021-02-01 16:54

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 co

相关标签:
4条回答
  • 2021-02-01 17:20

    I've just checked. It is generated here (in all your projects):

    gen/package_name/BuildConfig.java
    

    And contains the following:

    /** Automatically generated file. DO NOT MODIFY */
    package package_name;
    
    public final class BuildConfig {
        public final static boolean DEBUG = true;
    }
    
    0 讨论(0)
  • 2021-02-01 17:28

    IntelliJ apparently doesn't support generation of this file. I use IntelliJ to edit my code but ant to compile it, and the BuildConfig stuff is being generated for me. So you could either wait for IntelliJ to produce an update which generates BuildConfig or switch to ant for compilation.

    0 讨论(0)
  • 2021-02-01 17:31

    IntelliJ doesn't generate the BuildConfig java and class files.

    I assume this function is provided by the ADT plugin for Eclipse, and isn't a part of the SDK tools/common build stuff.

    0 讨论(0)
  • 2021-02-01 17:37

    IntelliJ Idea now supports generating of BuildConfig in newest EAP

    Relevant links:

    http://youtrack.jetbrains.com/issue/IDEA-83336 http://confluence.jetbrains.net/display/IDEADEV/IDEA+11.1+EAP

    0 讨论(0)
提交回复
热议问题