Android - Trial crashing in Release build



I just tried to create a release build of the Shinobi trial for our business owners to test with.  It is crashing immediately once I try to display a chart.  Could you provide me with some insight in how to get around the issue.  For now, I going to send them a debug build, but that is not our usual process.

Thank you for your help

java.lang.NoSuchFieldError: no field with name='nativeHandle' signature='J' in class Lcom/shinobicontrols/charts/SChartGLDrawer


Hi aderington,

It sounds like an obfuscation issue here - I take it you’re running your app through Proguard for the release build (and not doing so for the debug build)?

The simple solution is to make sure in your Proguard config you don’t obfuscate any of our library. Just add the following to your config file:

-libraryjars libs/shinobicharts-android-trial-1.4.1.jar
-keep class com.shinobicontrols.** { *; }    

This information wasn’t actually in our User Guide so my apologies for that but we’ve made sure it’ll be in there for our next release.

Kind regards,



That worked, thank you!


I’ve gotten farther, but now I get an NPE from Shinobi.

Stack Trace



1at com.shinobicontrols.charts.NumberAxis.a(SourceFile:311)

2at com.shinobicontrols.charts.cs.e(SourceFile:195)

3at com.shinobicontrols.charts.cs.d(SourceFile:146)

4at com.shinobicontrols.charts.cs.a(SourceFile:50)

5at com.shinobicontrols.charts.Axis.a(SourceFile:2114)

6at com.shinobicontrols.charts.x.a(SourceFile:214)

7at com.shinobicontrols.charts.t.onDraw(SourceFile:54)

8at android.view.View.draw(

9at com.shinobicontrols.charts.t.draw(SourceFile:64)

10at android.view.View.getDisplayList(

11at android.view.View.getDisplayList(

12at android.view.View.draw(

13at android.view.ViewGroup.drawChild(

14at android.view.ViewGroup.dispatchDraw(

15at com.shinobicontrols.charts.x.dispatchDraw(SourceFile:100)

16at android.view.View.getDisplayList(

17at android.view.View.getDisplayList(

18at android.view.View.draw(

19at android.view.ViewGroup.drawChild(

20at android.view.ViewGroup.dispatchDraw(

21at android.view.View.draw(

22at android.view.View.getDisplayList(

23at android.view.View.getDisplayList(

24at android.view.View.draw(

25at android.view.ViewGroup.drawChild(

26at android.view.ViewGroup.dispatchDraw(

27at android.view.View.getDisplayList(

28at android.view.View.getDisplayList(

29at android.view.View.draw(

30at android.view.ViewGroup.drawChild(

31at android.view.ViewGroup.dispatchDraw(

32at android.view.View.draw(

33at android.view.View.getDisplayList(

34at android.view.View.getDisplayList(

35at android.view.View.draw(

36at android.view.ViewGroup.drawChild(

37at android.view.ViewGroup.dispatchDraw(

38at android.view.View.getDisplayList(

39at android.view.View.getDisplayList(

40at android.view.View.draw(

41at android.view.ViewGroup.drawChild(

42at android.view.ViewGroup.dispatchDraw(

43at android.view.View.getDisplayList(

44at android.view.View.getDisplayList(

45at android.view.View.draw(

46at android.view.ViewGroup.drawChild(

47at android.view.ViewGroup.dispatchDraw(

48at android.view.View.getDisplayList(

49at android.view.View.getDisplayList(

50at android.view.View.draw(

51at android.view.ViewGroup.drawChild(

52at android.view.ViewGroup.dispatchDraw(

53at android.view.View.draw(

54at android.widget.FrameLayout.draw(

55at android.widget.ScrollView.draw(

56at android.view.View.getDisplayList(

57at android.view.View.getDisplayList(

58at android.view.View.draw(

59at android.view.ViewGroup.drawChild(

60at android.view.ViewGroup.dispatchDraw(

61at android.view.View.draw(

62at android.view.View.getDisplayList(

63at android.view.View.getDisplayList(

64at android.view.View.draw(

65at android.view.ViewGroup.drawChild(

66at android.view.ViewGroup.dispatchDraw(

67at android.view.View.getDisplayList(

68at android.view.View.getDisplayList(

69at android.view.View.draw(

70at android.view.ViewGroup.drawChild(

71at android.view.ViewGroup.dispatchDraw(

72at android.view.View.draw(


74at android.view.View.getDisplayList(

75at android.view.View.getDisplayList(

76at android.view.View.draw(

77at android.view.ViewGroup.drawChild(

78at android.view.ViewGroup.dispatchDraw(

79at android.view.View.getDisplayList(

80at android.view.View.getDisplayList(

81at android.view.View.draw(

82at android.view.ViewGroup.drawChild(

83at android.view.ViewGroup.dispatchDraw(

84at android.view.View.getDisplayList(

85at android.view.View.getDisplayList(

86at android.view.View.draw(

87at android.view.ViewGroup.drawChild(

88at android.view.ViewGroup.dispatchDraw(

89at android.view.View.getDisplayList(

90at android.view.View.getDisplayList(

91at android.view.View.draw(

92at android.view.ViewGroup.drawChild(

93at android.view.ViewGroup.dispatchDraw(

94at android.view.View.getDisplayList(

95at android.view.View.getDisplayList(

96at android.view.View.draw(

97at android.view.ViewGroup.drawChild(

98at android.view.ViewGroup.dispatchDraw(

99at android.view.View.draw(


101at android.view.View.getDisplayList(

102at android.view.View.getDisplayList(

103at android.view.View.draw(

104at android.view.ViewGroup.drawChild(

105at android.view.ViewGroup.dispatchDraw(

106at com.slidingmenu.lib.a.dispatchDraw(

107at android.view.View.draw(

108at android.view.View.getDisplayList(

109at android.view.View.getDisplayList(

110at android.view.View.draw(

111at android.view.ViewGroup.drawChild(

112at android.view.ViewGroup.dispatchDraw(

113at android.view.View.getDisplayList(

114at android.view.View.getDisplayList(

115at android.view.View.draw(

116at android.view.ViewGroup.drawChild(

117at android.view.ViewGroup.dispatchDraw(

118at android.view.View.draw(

119at android.widget.FrameLayout.draw(


121at android.view.View.getDisplayList(

122at android.view.View.getDisplayList(

123at android.view.HardwareRenderer$GlRenderer.buildDisplayList(

124at android.view.HardwareRenderer$GlRenderer.draw(

125at android.view.ViewRootImpl.draw(

126at android.view.ViewRootImpl.performDraw(

127at android.view.ViewRootImpl.performTraversals(

128at android.view.ViewRootImpl.doTraversal(

129at android.view.ViewRootImpl$

130at android.view.Choreographer$

131at android.view.Choreographer.doCallbacks(

132at android.view.Choreographer.doFrame(

133at android.view.Choreographer$

134at android.os.Handler.handleCallback(

135at android.os.Handler.dispatchMessage(

136at android.os.Looper.loop(


138at java.lang.reflect.Method.invokeNative(Native Method)

139at java.lang.reflect.Method.invoke(



142at dalvik.system.NativeStart.main(Native Method)

Could you please take a look?


Hi aderington,

Glad to hear you got the obfuscation issue sorted.

The NullPointer error sounds like a separate thing and seems to be related to where the TickMarks are being generated. Is it only happening in the release build or is the exception being thrown in the debug build as well?

Would it be possible to send us a sample project that exhibits the same behaviour so we can look into it further? If you could email it to that would be great.

Kind regards,



Unfortunately I have not been able to reproduce the crash. I can tell you the scenario though.

I was on an Activity with 5 fragments, each with a ChartView in it.  The charts had not all populated yet (still getting back the data from our servers)

I switched to another Activity that had a ChartFragment in it and that’s when it crashed.  Hopefully that helps.


Hello aderington,

Thank you for your enquiry. 

I notice that you are using a ChartView object in your application. May I please ask; have you included code to pass through all of the lifecycle callbacks (such as onCreate()) from the activity to the ChartView object(s)? 

For reference please see the api docs for the ChartView object at the link below:

In particular I’d like to draw your attention to the class overview section at the top of this document.

If you could please let us know if you have implemented this code, we should be able to look into this further for you.

In the meantime, if you have any further queries please get in touch.