manyixu / android-rome-feed-reader

Automatically exported from code.google.com/p/android-rome-feed-reader
0 stars 0 forks source link

Error with Lollipop - Resolved #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I ran into the following error (see attached for full stack):

Caused by: java.lang.NullPointerException: in == null
    at java.util.Properties.load(Properties.java:246)
    at com.google.code.rome.android.repackaged.com.sun.syndication.io.impl.PropertiesLoader.<init>(PropertiesLoader.java:74)

I resolved this by using the same workaround as described in this wiki for pre 
2.2:

https://android-rome-feed-reader.googlecode.com/svn-history/r132/wiki/Android21A
ndEarlierWorkaround.wiki

Specifically, I added the following to my doInBackground onPreExecute:

    Thread.currentThread().setContextClassLoader(getClass().getClassLoader());

Original issue reported on code.google.com by brian.ca...@gmail.com on 18 Apr 2015 at 1:32

Attachments:

GoogleCodeExporter commented 8 years ago
Note this was tested specifically with a Samsung Galaxy S6 running stock 5.0.2

Original comment by brian.ca...@gmail.com on 18 Apr 2015 at 1:38

GoogleCodeExporter commented 8 years ago
Hi Brian could you please explain better where to place that piece of code? i'm 
experiencing this issue on my application on Samsung devices updatet to 
lollipop.

Original comment by dilaurog...@gmail.com on 5 May 2015 at 1:46

GoogleCodeExporter commented 8 years ago
Hi, I just did exactly what I specified, put it in the onPreExecute, since I'm 
running the actual check in a separate thread. Just make sure you execute that 
line of code somewhere before querying.

Note I tested my app before the fix on my Nexus 9 and it did not have the same 
issue. May be a regression in 5.0.2 lollipop.

Original comment by brian.ca...@gmail.com on 5 May 2015 at 4:07

GoogleCodeExporter commented 8 years ago
Hi Brian, excuse me for the delay..
Your fix works! Now i don't have that problem anymore :)
thanks

Original comment by dilaurog...@gmail.com on 21 May 2015 at 3:22