Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumberFormatException with ic_sync_black_24dp.xml #225

Closed
stpch opened this issue Oct 25, 2015 · 3 comments

Comments

@stpch
Copy link

commented Oct 25, 2015

https://github.com/google/material-design-icons/blob/master/notification/drawable-anydpi-v21/ic_sync_black_24dp.xml throws the following exception on Android 5+:

java.lang.NumberFormatException: Invalid float: "-1.01.25"

Thanks for looking into it.

@malloth

This comment has been minimized.

Copy link

commented Nov 5, 2015

Actually it only crashes on API 21. It works well on API 22 and API 23. There is a problem with vector drawable parser on API 21. To fix this you need to add two spaces. Proper icon definition will look like this:

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24.0dp"
    android:height="24.0dp"
    android:viewportHeight="24.0"
    android:viewportWidth="24.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01,-.25 1.97,-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0,-4.42,-3.58,-8,-8,-8zm0 14c-3.31 0,-6,-2.69,-6,-6 0,-1.01 .25,-1.97 .7,-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4,-4,-4,-4v3z"/>
</vector>
@stpch

This comment has been minimized.

Copy link
Author

commented Nov 5, 2015

Alright, thanks! Not sure if I should close this, though, as it's a bug on API 21.

@shyndman shyndman added the bug label Nov 5, 2015

@shyndman

This comment has been minimized.

Copy link
Contributor

commented Nov 17, 2015

Fixed!

@shyndman shyndman closed this Nov 17, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.