首页 > 解决方案 > 回历日历 - com.github.msarhan.ummalqura.calendar.text.UmmalquraFormatData_fr_FR',键''

问题描述

我正在尝试将回历日历添加到我的 Android 应用程序中。我在 Github HIJRI CALENDARE 上获得了这个资源,正如它所说,我在我的 Activity 中添加了两个依赖项和 XML 完全相同,一切正常!

但是当我的应用程序启动时,我收到一个错误,我不知道它是什么!

这是我的日志:

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

谁能帮帮我吗?

标签: androidandroid-layout

解决方案


在您的错误日志中明确提到

android.view.InflateException:二进制 XML 文件行

原因是:

膨胀类 com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView 时出错

这意味着系统找不到您的MaterialHijriCalendarView

请确保您已在 gradle 文件中添加了此依赖项。

1) 对您的依赖项实施 'com.github.eltohamy:material-hijri-calendarview:1.1.1'。

2)添加实现组:'com.github.msarhan',名称:'ummalqura-calendar',版本:'1.1.7'到你的依赖


推荐阅读