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

NumberFormatException in the View Inflation containing Android Plot #60

Closed
jigar1859 opened this issue Aug 19, 2017 · 8 comments
Closed

Comments

@jigar1859
Copy link

08-19 19:59:25.694 4505-4505/com.lightstreamer.simple_demo.android E/AndroidRuntime: FATAL EXCEPTION: main Process: com.lightstreamer.simple_demo.android, PID: 4505 android.view.InflateException: Binary XML file line #46: Binary XML file line #46: Error inflating class com.androidplot.xy.XYPlot Caused by: android.view.InflateException: Binary XML file line #46: Error inflating class com.androidplot.xy.XYPlot Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:645) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate(LayoutInflater.java:861) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.inflate(LayoutInflater.java:518) at android.view.LayoutInflater.inflate(LayoutInflater.java:426) at com.lightstreamer.simple_demo.android.DetailsFragment.onCreateView(DetailsFragment.java:85) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2343) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367) at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6121) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) Caused by: java.lang.NumberFormatException: For input string: "@2131034204" at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1306) at java.lang.Float.parseFloat(Float.java:459) at com.androidplot.util.Configurator.parseFloatAttr(Configurator.java:150) at com.androidplot.util.Configurator.inflateParams(Configurator.java:236) at com.androidplot.util.Configurator.configure(Configurator.java:322) at com.androidplot.util.Configurator.configure(Configurator.java:286) at com.androidplot.Plot.loadAttrs(Plot.java:371) at com.androidplot.Plot.init(Plot.java:316) at com.androidplot.Plot.<init>(Plot.java:249) at com.androidplot.xy.XYPlot.<init>(XYPlot.java:150) at java.lang.reflect.Constructor.newInstance0(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:430)  at android.view.LayoutInflater.createView(LayoutInflater.java:645)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)  at android.view.LayoutInflater.inflate(LayoutInflater.java:518)  at android.view.LayoutInflater.inflate(LayoutInflater.java:426)  at com.lightstreamer.simple_demo.android.DetailsFragment.onCreateView(DetailsFragment.java:85)  at android.support.v4.app.Fragment.performCreateView(Fragment.java:2343)  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419)  at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740)  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809)  at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799)  at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580)  at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367)  at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322)  at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229)  at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700)  at android.os.Handler.handleCallback(Handler.java:751)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6121)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 

com.lightstreamer.simple_demo.android.DetailsFragment.onCreateView(DetailsFragment.java:85)

this piece of code is a below:
View view = inflater.inflate(R.layout.details_view, container, false);

Please advise...
Thanks in Advance

@jigar1859
Copy link
Author

Few other Details: Using Android Studio 3.0 Canary. and little older version of the library... However tired upgrading to latest.. issue still persists...

complie 'com.androidplot:androidplot-core:0.6.1' OR
compile "com.androidplot:androidplot-core:1.5.1"

@halfhp
Copy link
Owner

halfhp commented Aug 19, 2017

Unfortunately this isn't enough info to go on. Can you provide sample that reproduces the issue?

@jigar1859
Copy link
Author

@halfhp Thanks for the revert. Its nothing Confidential... So i can share the code... its boiler plate code to integrate LightStreamer SDK in Android native app... Please do advise if this helps reproduce the issue...

P.S. Source Code plus gradle files attached..

Thanks

Uploading Archive.zip…

@jigar1859
Copy link
Author

@halfhp
Copy link
Owner

halfhp commented Aug 19, 2017

Thanks @jigar1859 - I should hopefully have a chance to take a look a little later this evening.

@jigar1859
Copy link
Author

Thanks @halfhp Appreciate it...

Just an minor update: Tried commenting the Code for Android Plot every where in the project.. works fine in that case

Version: compile "com.androidplot:androidplot-core:1.5.1"

@halfhp
Copy link
Owner

halfhp commented Aug 20, 2017

Appears to be misuse of configurator - this line in your various versions of details_view.xml:

androidPlot.graphWidge.gridLinePaint.color="#000000"

should actually be:

androidPlot.graphWidget.domainGridLinePaint.color="#000000"
androidPlot.graphWidget.rangeGridLinePaint.color="#000000"

@jigar1859
Copy link
Author

jigar1859 commented Aug 20, 2017

Thanks @halfhp . Been a great help... That was the source of the problem... got things to fix in the graph... however it works fine...

Appreciate your help.. You may kindly Closing this issue.
Regards,
Jigar Thakkar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants