Database.Logger.Level Enum Values ​​not available in version 11.0.0

Update June 30:

This issue has been fixed in version 11.0.2.


Prior to Firebase 11.0.0, the direct access values Database.Logger.Level were directly accessible. An example that compiles with 10.2.6:

FirebaseDatabase.getInstance().setLogLevel(Logger.Level.DEBUG);

      

This statement does not compile using version 11.0.0. A workaround is to use valueOf()

:

FirebaseDatabase.getInstance().setLogLevel(Logger.Level.valueOf("DEBUG"));

      

In 11.0.0 the decompiled .class file for Database.Logger

:

public interface Logger {
    public static enum Level {
        zzcbX,
        zzcbY,
        zzcbZ,
        zzcca,
        zzccb;

        private Level() {
        }
    }
}

      

In 10.2.6 these are:

public interface Logger {
    public static enum Level {
        DEBUG,
        INFO,
        WARN,
        ERROR,
        NONE;

        private Level() {
        }
    }
}

      

Is there a valueOf()

suitable workaround until the enumeration values ​​are available again?

+3


source to share


1 answer


firebaser here



This is a known bug in versions 11.0.0 and 11.0.1 of the Android SDK. It should be fixed in version 11.0.2, which should take place in early July.

+1


source







All Articles