Android - Unable to test Chart with CandlestickSeries with Roboelectric



I am creating unit tests for our charting package (per our development process).  We use Roboelectric to speed up test runs.  I have been able to successfully create tests for LineSeries charts, but once I tried to create a test for our CandlestickSeries chart, I started getting this exception.

java.lang.NoClassDefFoundError: com/shinobicontrols/charts/r (wrong name: com/shinobicontrols/charts/R)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(
	at java.lang.ClassLoader.defineClass(
	at java.lang.ClassLoader.defineClass(
	at org.robolectric.bytecode.AsmInstrumentingClassLoader.findClass(
	at org.robolectric.bytecode.AsmInstrumentingClassLoader.loadClass(
	at com.shinobicontrols.charts.CandlestickSeries.<init>(SourceFile:25)

I believe this issue is because CandlestickSeries uses an obfuscated class called ‘r’, which is conflicting with the standard resource class ‘R’.  I am developing on a Mac, which could be causing some of the issue as it is not case sensitive.  I believe if you rebuilt the jar with obfuscation, but disallowing ‘r’ as a valid name, then my tests would work.



Hi aderington,

We’ll take a look into this and get back to you in due course. Can you remind me what version and what flavor (Premium or Trial) you are using please?

Kind regards,



I am using version 1.5.0 Premium.



Hello aderington,

Thank you for this extra information. We are investigating this and we will reply to this post soon.




Hello aderington,

Thanks for getting back in touch and providing the extra information.

We’ve been looking into this and we think we may have come up with a solution. Could you please email with your support key and we should be able to help you further.

We look forward to hearing from you.

Thanks and kind regards,



Just a note to anyone reading this post - we’ve now released v1.6.0 of ShinobiCharts for Android which includes a fix for this bug. It’s available in the Customer Portal and as a trial download from