The following classes could not be instantiated: - xxx.EditSpinner (Open Class, Show Exception, Clear Cache) Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE. If this is an unexpected error you can also try to build the project, then manually refresh the layout. Exception Details java.lang.VerifyError: Bad type on operand stack Exception Details: Location: xxx/EditSpinner.initMy2Event()V @69: invokevirtual Reason: Type 'java/lang/Object' (current frame, stack[0]) is not assignable to 'android/view/View' Current Frame: bci: @69 flags: { } locals: { 'xxxEditSpinner', 'java/lang/Object' } stack: { 'java/lang/Object', 'xxx/EditSpinner$2' } Bytecode: 0000000: 2ab4 0124 c101 a799 0015 2ab4 0124 c001 0000010: a74c 2b2a ba02 1a00 00b6 021e 2ab4 0088 0000020: 2ab4 014f b602 222a b400 9305 a000 0b2a 0000030: b401 3d4c a700 082a b400 b94c 2bbb 0018 0000040: 592a b702 23b6 0227 2ab4 0124 2aba 0231 0000050: 0same_frame(@55) append_frame(@60,Object[#589]) at java.lang.Class.getDeclaredConstructors0(Class.java:-2) at java.lang.Class.privateGetDeclaredConstructors(Class.java:3137) at java.lang.Class.getConstructor0(Class.java:3342) at java.lang.Class.getConstructor(Class.java:2151) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:1127) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1101) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:1130) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72) at android.view.LayoutIn
ImageProvider imageProvider; if (Global.profile.user.logourl.isEmpty) { imageProvider = AssetImage('assets/images/ico_head_default.png'); } else { imageProvider = NetworkImage(Global.profile.user.logourl); } Object imageProviderX; Object obj=Global.profile.user.logourl.isEmpty?AssetImage('assets/images/ico_head_default.png'): NetworkImage(Global.profile.user.logourl); //A value of type 'Object' can't be assigned to a variable of type 'ImageProvider<Object>'.下面这行错误 imageProvider=Global.profile.user.logourl.isEmpty?AssetImage('assets/images/ico_head_default.png'): NetworkImage(Global.profile.user.logourl);