InflationX / Calligraphy

Custom fonts in Android the easy way...
Apache License 2.0
1.09k stars 83 forks source link

androidx.appcompat.widget.FitWindowsLinearLayout #53

Closed HardyInfotech closed 3 years ago

HardyInfotech commented 4 years ago

**

How to solve it ...

**

java.lang.RuntimeException: Unable to start activity ComponentInfo{Packge_name.TextEdit(Activity)}: android.view.InflateException: Binary XML file line #17 in Packge_name:layout/abc_screen_simple: Binary XML file line #17 in Packge_name:layout/abc_screen_simple: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout

Caused by: android.view.InflateException: Binary XML file line #17 in Packge_name:layout/abc_screen_simple: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Field.get(java.lang.Object)' on a null object reference

dirol90 commented 3 years ago

same problem

AlejandroHCruz commented 3 years ago

@dirol90 please refer to my comment here.

mobileapppaul commented 3 years ago

@AlejandroHCruz has this been resolved yet I'm still experience this issue - I also get the same issue with the sample app. I have upgraded to the latest version as suggested above but still doesnt work for me 👎 .

@chrisjenx did you get this resolved ?

Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Field.get(java.lang.Object)' on a null object reference at io.github.inflationx.viewpump.ReflectionUtils.getValue(ReflectionUtils.java:25) at io.github.inflationx.viewpump.ViewPumpLayoutInflater.createCustomViewInternal(ViewPumpLayoutInflater.java:196) at io.github.inflationx.viewpump.ViewPumpLayoutInflater.access$000(ViewPumpLayoutInflater.java:14) at io.github.inflationx.viewpump.ViewPumpLayoutInflater$PrivateWrapperFactory2ViewCreator.onCreateView(ViewPumpLayoutInflater.java:405) at io.github.inflationx.viewpump.FallbackViewCreationInterceptor.intercept(FallbackViewCreationInterceptor.java:11) at io.github.inflationx.viewpump.InterceptorChain.proceed(InterceptorChain.java:37) at io.github.inflationx.calligraphy3.CalligraphyInterceptor.intercept(CalligraphyInterceptor.java:18) at io.github.inflationx.viewpump.InterceptorChain.proceed(InterceptorChain.java:37) at io.github.inflationx.viewpump.ViewPump.inflate(ViewPump.java:49) at io.github.inflationx.viewpump.ViewPumpLayoutInflater$PrivateWrapperFactory2.onCreateView(ViewPumpLayoutInflater.java:385) at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:239) at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1069) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:997) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961) at android.view.LayoutInflater.inflate(LayoutInflater.java:659) at io.github.inflationx.viewpump.ViewPumpLayoutInflater.inflate(ViewPumpLayoutInflater.java:55) at android.view.LayoutInflater.inflate(LayoutInflater.java:534) at android.view.LayoutInflater.inflate(LayoutInflater.java:481) at b.b.k.f.F(AppCompatDelegateImpl.java:631) at b.b.k.f.M(AppCompatDelegateImpl.java:518) at b.b.k.f.v(AppCompatDelegateImpl.java:466) at b.b.k.c.setContentView(AppCompatActivity.java:140) at e.d.a.j.f.setContentView(BaseActivity.java:68)

chrisjenx commented 3 years ago

We fixed this pretty quickly, make sure you are using ViewPump 2.0.3: https://github.com/InflationX/ViewPump/blob/master/CHANGELOG.md#version-203-2019-06-07

chrisjenx commented 3 years ago

https://github.com/InflationX/Calligraphy/issues/35#issuecomment-676523448 gave an exact fix