Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BuildConfig is public, should be declared in a file named BuildConfig.java

Seem to be getting this occurring error whenever I run my android application.

The only way to get around it is by rebuilding the project and runs normally again.

If anyone knows the reason for this will be much appreciated

like image 940
dave o grady Avatar asked Dec 21 '19 17:12

dave o grady


People also ask

How is BuildConfig generated?

Build Config is a java class that Gradle generates it at build time so your app can inspect current information of your build. By default, BuildConfig. java always generated at your app build time in each android module, and it comes with variables e.g., DEBUG, APPLICATION_ID, BUILD_TYPE and etc.

What is BuildConfig debug?

In recent versions of the Android Developer Tools (ADT) for Eclipse, there's a class called BuildConfig which is automatically generated by the build. This class is updated automatically by Android's build system (like the R class), and it contains a static final boolean called DEBUG, which is normally set to true.


1 Answers

Try Build -> Clean Project Then Build -> Make Project

like image 131
Allen M. Avatar answered Oct 02 '22 01:10

Allen M.