Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer if VersionName not set #177

Closed
marcuspridham opened this issue May 10, 2018 · 3 comments
Closed

Null pointer if VersionName not set #177

marcuspridham opened this issue May 10, 2018 · 3 comments
Labels
Milestone

Comments

@marcuspridham
Copy link
Contributor

marcuspridham commented May 10, 2018

This seems to have been broken by commit 10d35f7 (introduced in v1.1.1-11). If the application does not have a versionName set, the LoggerContext can't be setup properly.

W/System.err: Failed to instantiate [ch.qos.logback.classic.LoggerContext]
    Reported exception:
    java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:461)
W/System.err:     at java.util.Properties.setProperty(Properties.java:161)
        at ch.qos.logback.core.android.AndroidContextUtil.setupProperties(Unknown Source:49)
        at ch.qos.logback.classic.util.ContextInitializer.autoConfig(Unknown Source:12)
        at org.slf4j.impl.StaticLoggerBinder.init(Unknown Source:7)
        at org.slf4j.impl.StaticLoggerBinder.<clinit>(Unknown Source:20)
marcuspridham pushed a commit to marcuspridham/logback-android that referenced this issue May 10, 2018
Fix for issue tony19#177.  The LoggerContext was failing to instantiate
if  the version name was null.
@tony19 tony19 added this to the 1.1.1-12 milestone May 10, 2018
@tony19
Copy link
Owner

tony19 commented May 10, 2018

Simplest workaround for now is to set versionName to a blank string (assuming no versionName required) in your app's build.gradle:

android {
  defaultConfig {
      versionCode 1
      versionName " "
  }
  ...
}

@tony19 tony19 closed this as completed May 11, 2018
@tony19
Copy link
Owner

tony19 commented May 19, 2018

Fixed in v_1.1.1-12

@lock
Copy link

lock bot commented Feb 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the archived label Feb 27, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants