InflationX / Calligraphy

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

crash on Android Q #22

Closed benoitjoguet closed 5 years ago

benoitjoguet commented 5 years ago

I test the library targeting Android Q I have a crash. Seems related to reflection 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:235)

adiga-maf commented 5 years ago

I couldn't get the solution. I implemented the latest version of this library but crash still occur!

goodluckier commented 4 years ago

@adiga-maf add this try again : implementation 'me.weishu:free_reflection:2.1.0'