ParallaxScroll icon indicating copy to clipboard operation
ParallaxScroll copied to clipboard

broken since update to support libs 26.1.0

Open theScrabi opened this issue 7 years ago • 19 comments

Since updating to 26.1.0 With support libs I'm getting this error. Can someone confirm?

org.schabi.newpipe.report.ErrorActivity: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.nirhart.parallaxscroll.views.ParallaxScrollView
                                                                                                       Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class com.nirhart.parallaxscroll.views.ParallaxScrollView
                                                                                                       Caused by: java.lang.reflect.InvocationTargetException
                                                                                                           at java.lang.reflect.Constructor.newInstance0(Native Method)
                                                                                                           at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
                                                                                                           at android.view.LayoutInflater.createView(LayoutInflater.java:645)
                                                                                                           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
                                                                                                           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
                                                                                                           at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
                                                                                                           at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
                                                                                                           at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
                                                                                                           at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
                                                                                                           at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
                                                                                                           at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
                                                                                                           at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:339)
                                                                                                           at android.view.LayoutInflater.inflate(<Xposed>)
                                                                                                           at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
                                                                                                           at org.schabi.newpipe.fragments.detail.VideoDetailFragment.onCreateView(VideoDetailFragment.java:187)
                                                                                                           at android.support.v4.app.Fragment.performCreateView(Fragment.java:2354)
                                                                                                           at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419)
                                                                                                           at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740)
                                                                                                           at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809)
                                                                                                           at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799)
                                                                                                           at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580)
                                                                                                           at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367)
                                                                                                           at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322)
                                                                                                           at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229)
                                                                                                           at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700)
                                                                                                           at android.os.Handler.handleCallback(Handler.java:751)
                                                                                                           at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                                           at android.os.Looper.loop(Looper.java:154)
                                                                                                           at android.app.ActivityThread.main(ActivityThread.java:6186)
                                                                                                           at java.lang.reflect.Method.invoke(Native Method)
                                                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
                                                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
                                                                                                           at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:103)
                                                                                                        Caused by: java.lang.NumberFormatException: For input string: "1.9"
                                                                                                           at java.lang.Integer.parseInt(Integer.java:521)
                                                                                                           at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:133)
                                                                                                           at android.content.res.TypedArray.getInt(TypedArray.java:365)
                                                                                                           at android.content.res.XResources$XTypedArray.getInt(XResources.java:1409)
                                                                                                           at com.nirhart.parallaxscroll.views.ParallaxScrollView.init(ParallaxScrollView.java:45)
                                                                                                           at com.nirhart.parallaxscroll.views.ParallaxScrollView.<init>(ParallaxScrollView.java:33)
                                                                                                           at java.lang.reflect.Constructor.newInstance0(Native Method) 
                                                                                                           at java.lang.reflect.Constructor.newInstance(Constructor.java:430) 
                                                                                                           at android.view.LayoutInflater.createView(LayoutInflater.java:645) 
                                                                                                           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) 
                                                                                                           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) 
                                                                                                           at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) 
                                                                                                           at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 
                                                                                                           at android.view.LayoutInflater.rInflate(LayoutInflater.java:861) 
                                                                                                           at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 
                                                                                                           at android.view.LayoutInflater.inflate(LayoutInflater.java:518) 
                                                                                                           at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method) 
                                                                                                           at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:339) 
                                                                                                           at android.view.LayoutInflater.inflate(<Xposed>) 
                                                                                                           at android.view.LayoutInflater.inflate(LayoutInflater.java:426) 
                                                                                                           at org.schabi.newpipe.fragments.detail.VideoDetailFragment.onCreateView(VideoDetailFragment.java:187) 
                                                                                                           at android.support.v4.app.Fragment.performCreateView(Fragment.java:2354) 
                                                                                                           at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419) 
                                                                                                           at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740) 
                                                                                                           at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809) 
                                                                                                           at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799) 
                                                                                                           at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580) 
                                                                                                           at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367) 
                                                                                                           at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322) 
                                                                                                           at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229) 
                                                                                                           at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700) 
                                                                                                           at android.os.Handler.handleCallback(Handler.java:751) 
                                                                                                           at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                                                           at android.os.Looper.loop(Looper.java:154) 
                                                                                                           at android.app.ActivityThread.main(ActivityThread.java:6186) 
                                                                                                           at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 
                                                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 
                                                                                                           at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:103) 
                                                                                                       android.view.InflateException: Binary XML file line #0: Error inflating class com.nirhart.parallaxscroll.views.ParallaxScrollView
                                                                                                       Caused by: java.lang.reflect.InvocationTargetException
                                                                                                           at java.lang.reflect.Constructor.newInstance0(Native Method)
                                                                                                           at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
                                                                                                           at android.view.LayoutInflater.createView(LayoutInflater.java:645)
                                                                                                           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
                                                                                                           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
                                                                                                           at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
                                                                                                           at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
                                                                                                       	at android.view.Layou

theScrabi avatar Oct 26 '17 21:10 theScrabi

Yes, I'm going to make a PR that solves it

thebestpol avatar Oct 27 '17 09:10 thebestpol

Nice thank you :)

theScrabi avatar Oct 27 '17 10:10 theScrabi

In my fork you can find the solution, PR is pending

thebestpol avatar Oct 27 '17 11:10 thebestpol

Thx

theScrabi avatar Oct 27 '17 12:10 theScrabi

Same problem, waiting for an update

mastro993 avatar Oct 28 '17 11:10 mastro993

How do I know the fix is available, and what should I do to get it? Increase the version number?

theScrabi avatar Oct 31 '17 08:10 theScrabi

Hey maybe it is worth increasing the version of the project. I have a similar problem and I can't seem to get the latest version throw gradle. I even deleted the gradle cache and everything. I don't know what else to do now. Therefore I am kindly suggesting that maybe increasing the projects version number would be a pretty easy and solid solution. Or does anybody have another suggestion?

lfranken3pc avatar Nov 02 '17 13:11 lfranken3pc

Yea would be a nice thing :)

theScrabi avatar Nov 02 '17 18:11 theScrabi

Hello plz update the branch to the latest version the conflict with 26.1.0 build tools is really getting on the nerve and also it is making delay in my release date

SajadSarabadani avatar Nov 12 '17 11:11 SajadSarabadani

@SajadSarabadani over at NewPipe we fixed it by using jitpack instead of the official repo. Se here. With jitpack you can simply pick any commit.

theScrabi avatar Nov 12 '17 11:11 theScrabi

@theScrabi thank you so much

SajadSarabadani avatar Nov 12 '17 12:11 SajadSarabadani

@theScrabi i'm getting Failed to resolve: com.github.nirhart:ParallaxScroll:dd53d1f9d1 how can i solve this?

pasha3005 avatar Nov 22 '17 20:11 pasha3005

I have no idea. Did you try to add a different commit? Or maybe your gradle is not fetching from jitpack. This or that way, I honestly have not much plan about jitpack, and mvn, I didn't introduce this to our project.

Edit: I found out that one thing that might help is to clear the gradle cache $HOME/.gradle/cache.

theScrabi avatar Nov 22 '17 21:11 theScrabi

Hi, i'm still getting this issue, any advice on how to resolve it?

Ollydickinson avatar Feb 08 '18 21:02 Ollydickinson

Hey @Ollydickinson , I ended up copying the necessary parts from the project and rearrange them for my needs. I know this isn't satisfying but I had no other option and in the end it was easier than expected and now i can work with it very comfortable.

lfranken3pc avatar Feb 09 '18 07:02 lfranken3pc

@lfranken3pc Thanks for the suggestion, will give this a go.

Ollydickinson avatar Feb 09 '18 20:02 Ollydickinson

If you have an integer value as your parallax_factor you can do a workaround by defining that integer in values/integers.xml and using this resource in your xml

TreyWurm avatar Mar 23 '18 08:03 TreyWurm

this problem is occurred because dependency use implementation 'com.github.nirhart:parallaxscroll:1.0' not working with compileSdkVersion 27 or new sdk version,

you can salve this to download module from github and impot module in your project and update with ur project sdk version.this is my project update library gradle sdk version

murleepatle avatar Jun 12 '18 20:06 murleepatle

I'm still facing this issue, any workaround?

alexxgarci avatar Jun 13 '18 11:06 alexxgarci