Reputation: 1
I'm trying to add Hijri calendar to my Android App. I got this resource on Github HIJRI CALENDARE and as it said I added the two dependencies and the XML in my Activity exactly the same all work fine!
But when my App starts I get an error that I don't know what it is!
Heres my Log:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mon.muslim/com.example.mon.muslim.Map}: android.view.InflateException: Binary XML file line #9: Error inflating class com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2699)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2773)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5930)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView
at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.example.mon.muslim.Map.onCreate(Map.java:18)
at android.app.Activity.performCreate(Activity.java:6178)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2652)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2773)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5930)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.example.mon.muslim.Map.onCreate(Map.java:18)
at android.app.Activity.performCreate(Activity.java:6178)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2652)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2773)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5930)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Caused by: java.util.MissingResourceException: Can't find resource for bundle 'com.github.msarhan.ummalqura.calendar.text.UmmalquraFormatData_fr_FR', key ''
at java.util.ResourceBundle.missingResourceException(ResourceBundle.java:238)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:230)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:159)
at com.github.msarhan.ummalqura.calendar.UmmalquraDateFormatSymbols.initializeData(UmmalquraDateFormatSymbols.java:91)
at com.github.msarhan.ummalqura.calendar.UmmalquraDateFormatSymbols.(UmmalquraDateFormatSymbols.java:66)
at com.github.msarhan.ummalqura.calendar.UmmalquraCalendar.getDisplayName(UmmalquraCalendar.java:325)
at com.github.eltohamy.materialhijricalendarview.format.DateFormatTitleFormatter.format(DateFormatTitleFormatter.java:42)
at com.github.eltohamy.materialhijricalendarview.TitleChanger.doChange(TitleChanger.java:68)
at com.github.eltohamy.materialhijricalendarview.TitleChanger.change(TitleChanger.java:51)
at com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView.updateUi(MaterialHijriCalendarView.java:373)
at com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView.access$600(MaterialHijriCalendarView.java:67)
at com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView$2.onPageSelected(MaterialHijriCalendarView.java:184)
at android.support.v4.view.ViewPager.dispatchOnPageSelected(ViewPager.java:1935)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:659)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:625)
at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:617)
at com.git
Can anyone please help me?
Upvotes: 0
Views: 653
Reputation: 4087
In your error Log it is clearly mentioned that
android.view.InflateException: Binary XML file line
and the reason is :
Error inflating class com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView
it means system can't find your MaterialHijriCalendarView class
Please Ensure than you have added this dependencies in your gradle file .
1) implementation 'com.github.eltohamy:material-hijri-calendarview:1.1.1' to your dependencies.
2) Add implementation group: 'com.github.msarhan', name: 'ummalqura-calendar', version:'1.1.7' to your dependencies
Upvotes: 2