Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

ava.lang.IllegalArgumentException: Cannot set 'scaleX' to Float.NaN #346

Open
devdhar04 opened this issue Sep 2, 2018 · 11 comments
Open

Comments

@devdhar04
Copy link

I am facing this issue :
Fatal Exception: java.lang.IllegalArgumentException: Cannot set 'scaleX' to Float.NaN
at android.view.View.sanitizeFloatPropertyValue(View.java:15425)
at android.view.View.sanitizeFloatPropertyValue(View.java:15399)
at android.view.View.setScaleX(View.java:14788)
at android.support.v4.view.ViewCompat.setScaleX(ViewCompat.java:2870)
at com.github.florent37.materialviewpager.Utils.setScale(Utils.java:66)
at com.github.florent37.materialviewpager.MaterialViewPagerAnimator.onMaterialScrolled(MaterialViewPagerAnimator.java:198)
at com.github.florent37.materialviewpager.MaterialViewPagerAnimator.access$000(MaterialViewPagerAnimator.java:40)
at com.github.florent37.materialviewpager.MaterialViewPagerAnimator$3.onScrolled(MaterialViewPagerAnimator.java:340)
at android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:4892)
at android.support.v7.widget.RecyclerView.scrollByInternal(RecyclerView.java:1889)
at android.support.v7.widget.RecyclerView.onTouchEvent(RecyclerView.java:3122)
at android.view.View.dispatchTouchEvent(View.java:12513)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3024)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2705)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:440)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1830)
at android.app.Activity.dispatchTouchEvent(Activity.java:3400)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:398)
at android.view.View.dispatchPointerEvent(View.java:12752)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5107)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4910)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4427)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4480)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4446)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4586)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4454)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4643)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4427)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4480)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4446)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4454)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4427)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7093)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7062)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7023)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7196)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:186)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(InputEventReceiver.java)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:177)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:7167)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:7219)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:690)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

@tobi512
Copy link

tobi512 commented Jan 8, 2019

Hi @devdhar04
did you already find a solution? I'm having the same issue on another library (using React Native), but the error message is exactly the same. Let me know if you have any more information!

Cheers,
Tobias

@devdhar04
Copy link
Author

Hi @devdhar04
did you already find a solution? I'm having the same issue on another library (using React Native), but the error message is exactly the same. Let me know if you have any more information!

Cheers,
Tobias

I didnt get any solution of that issue, so i removed this library from my code , as it crashing on Android 9.0.

@Goodgulf91
Copy link

Any one have solution for this issue?

@jsyjst
Copy link

jsyjst commented May 27, 2019

Modify targetSdkVersion=27, the pro test had effect

@masheransari
Copy link

Modify targetSdkVersion=27, the pro test had effect

This solution is not working on AndroidX

@futbolkolektyw
Copy link

I made fork with fix for this issue:
implementation "com.github.futbolkolektyw:MaterialViewPager:1.4.0"

feel free to use it

@vedraj360
Copy link

vedraj360 commented Jan 13, 2020

I made fork with fix for this issue:
implementation "com.github.futbolkolektyw:MaterialViewPager:1.4.0"

feel free to use it

Thanks for this It worked. Can you tell me how you fixed the problem as your solution worked.

@Goodgulf91
Copy link

I just checked the variable 'scale' is not null
futbolkolektyw@0a9c4dc

@SalimovAzimjon
Copy link

I just checked the variable 'scale' is not null
futbolkolektyw@0a9c4dc

Thanks a lot!!!

@MikhT
Copy link

MikhT commented Sep 14, 2020

I made fork with fix for this issue:
implementation "com.github.futbolkolektyw:MaterialViewPager:1.4.0"
feel free to use it

Thanks for this It worked. Can you tell me how you fixed the problem as your solution worked.

I try it but I didn't found "com.github.florent37.materialviewpager.adapter.RecyclerViewMaterialAdapter;" you know why? adapter not exist in your fork?

@Goodgulf91
Copy link

Goodgulf91 commented Sep 14, 2020

@MikhT

I made fork with fix for this issue:
implementation "com.github.futbolkolektyw:MaterialViewPager:1.4.0"
feel free to use it

Thanks for this It worked. Can you tell me how you fixed the problem as your solution worked.

I try it but I didn't found "com.github.florent37.materialviewpager.adapter.RecyclerViewMaterialAdapter;" you know why? adapter not exist in your fork?

It was removed by orginal creator:
4ebc9f4

on 28 Feb 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants