На некоторых устройствах происходит сбой приложения из-за проблем с макетом.
Теперь происходит сбой только VIVO Y66 (Android 6.0.1, API 23).
Если фрагмент содержит изображение, он получит InflateExceptionошибка:
android.view.InflateException: Binary XML file line #19: Binary XML file line #19: Error inflating class ImageView
at android.view.LayoutInflater.inflate(LayoutInflater.java:545)
at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
at com.abacus.newonlineordering.view.fragment.RoyaltyPointsFragment.onCreateView(RoyaltyPointsFragment.java:87)
at android.app.Fragment.performCreateView(Fragment.java:2220)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:973)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148)
at android.app.BackStackRecord.run(BackStackRecord.java:793)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:482)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5619)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:853)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)
Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class ImageView
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:827)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:749)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:880)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:843)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:883)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:843)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:883)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:843)
at android.view.LayoutInflater.inflate(LayoutInflater.java:521)
at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
at com.abacus.newonlineordering.view.fragment.RoyaltyPointsFragment.onCreateView(RoyaltyPointsFragment.java:87)
at android.app.Fragment.performCreateView(Fragment.java:2220)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:973)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148)
at android.app.BackStackRecord.run(BackStackRecord.java:793)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:482)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5619)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:853)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)
Caused by: android.content.res.Resources$NotFoundException: Resource "com.abacus.newonlineordering:drawable/barcode" (7f070061) is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f070061 a=-1 r=0x7f070061}
at android.content.res.Resources.loadDrawableForCookie(Resources.java:2668)
at android.content.res.Resources.loadDrawable(Resources.java:2606)
at android.content.res.VivoResources.loadDrawable(VivoResources.java:220)
at android.content.res.TypedArray.getDrawable(TypedArray.java:870)
at android.widget.ImageView.<init>(ImageView.java:152)
at android.widget.ImageView.<init>(ImageView.java:140)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:71)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:67)
at android.support.v7.app.AppCompatViewInflater.createImageView(AppCompatViewInflater.java:181)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:105)
at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1035)
at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1092)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:791)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:749)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:880)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:843)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:883)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:843)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:883)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:843)
at android.view.LayoutInflater.inflate(LayoutInflater.java:521)
at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
at com.abacus.newonlineordering.view.fragment.RoyaltyPointsFragment.onCreateView(RoyaltyPointsFragment.java:87)
at android.app.Fragment.performCreateView(Fragment.java:2220)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:973)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148)
at android.app.BackStackRecord.run(BackStackRecord.java:793)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:482)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5619)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:853)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)
Если фрагмент имеет всплывающее диалоговое окно, он получит следующую ошибку:
android.util.AndroidRuntimeException: requestFeature() must be called before adding content
at com.android.internal.policy.PhoneWindow.requestFeature(PhoneWindow.java:352)
at com.android.internal.app.AlertController.installContent(AlertController.java:264)
at android.app.AlertDialog.onCreate(AlertDialog.java:433)
at android.app.Dialog.dispatchOnCreate(Dialog.java:394)
at android.app.Dialog.show(Dialog.java:295)
at com.abacus.newonlineordering.tool.Utils.showAlertDialog(Utils.java:130)
at com.abacus.newonlineordering.view.fragment.SettingFragment.showConfirmMsg(SettingFragment.java:274)
at com.abacus.newonlineordering.view.fragment.SettingFragment.access$100(SettingFragment.java:53)
at com.abacus.newonlineordering.view.fragment.SettingFragment$2.onClick(SettingFragment.java:259)
at android.view.View.performClick(View.java:5212)
at android.view.View$PerformClick.run(View.java:21214)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5619)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:853)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)
Приложение отлично работает на других устройствах.