Android Question MPAndroidCharts - Error

awakenblueheart

Member
Licensed User
Hi all,

I am using MPAndroidChart Library by Johan Schoeman. I got below error. Can someone guide what is wrong?

B4X:
mlc1.setBarData(2,5)
android.content.res.Resources$NotFoundException: Resource ID #0x0
   at android.content.res.Resources.getValue(Resources.java:892)
   at android.content.res.Resources.loadXmlResourceParser(Resources.java:1869)
   at android.content.res.Resources.getLayout(Resources.java:731)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
   at com.github.mikephil.charting.components.MarkerView.setupLayoutResource(MarkerView.java:39)
   at com.github.mikephil.charting.components.MarkerView.<init>(MarkerView.java:29)
   at com.github.mikephil.charting.components.MyMarkerView.<init>(MyMarkerView.java:24)
   at mpandroidchartwrapper.multiBarChartWrapper.setBarData(multiBarChartWrapper.java:365)
   at awakenheart.myasschecker.student_statistics._draw_graph_6(student_statistics.java:827)
   at awakenheart.myasschecker.student_statistics._countgred(student_statistics.java:532)
   at awakenheart.myasschecker.student_statistics._statistiksubjek(student_statistics.java:1454)
   at awakenheart.myasschecker.student_statistics._activity_create(student_statistics.java:361)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:507)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
   at awakenheart.myasschecker.student_statistics.afterFirstLayout(student_statistics.java:102)
   at awakenheart.myasschecker.student_statistics.access$000(student_statistics.java:17)
   at awakenheart.myasschecker.student_statistics$WaitForLayout.run(student_statistics.java:80)
   at android.os.Handler.handleCallback(Handler.java:587)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:123)
   at android.app.ActivityThread.main(ActivityThread.java:3683)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:507)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
   at dalvik.system.NativeStart.main(Native Method)
android.content.res.Resources$NotFoundException: Resource ID #0x0
 

DonManfred

Expert
Licensed User
Seems you are missing additional resorces in your project. did you copied all files correctly and use the correct additionalres directives in your project?
Without seeing you code we just can guess. Export your project as zip and upload it here
 
Upvote 0

awakenblueheart

Member
Licensed User
Yeah, you're correct. Just copied some file in res folder from the library project file into my project file, then the error 'disappear' .

Thanks DonManfred

:D
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Hello
How could you solve it?
I do not know what files I should copy help me thanks
Look in the /Object/res/xxxx folders of one of the B4A sample projects. There are folder with files that you need to copy to your project. Make sure you set the files to "read only" else they will be deleted when you compile the b4A project.
 
Upvote 0
Top