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

Fix crash due to missing resource on API levels 20 and below #91

Closed

Conversation

TheDorkKnightRises
Copy link
Contributor

See issue #90

Tested on Android 4.4.2

@fat-tire
Copy link
Collaborator

FWIW I also addressed this issue in PR #67 by just reusing an existing forward arrow image used elsewhere (as a .png). I did notice a problem with the XML vector graphic disappearing from the actual apk in my build and not being accessible -- at least from api 16 and figured using the existing image worked just as well. Didn't investigate why the arrow xml image got dropped by the latest Android Studio tho.

@fat-tire
Copy link
Collaborator

I should add that I did try stuff like explicitly saying to keep the resource w a res/values/keep.xml and turning on legacy vector image support (also in #62) but it didn't seem to matter... might be an AS bug.

@TheDorkKnightRises
Copy link
Contributor Author

TheDorkKnightRises commented Dec 23, 2017

Wait so your fix (using PNG and not XML drawable) works well on all older devices too? Then I should probably close this PR, cuz I just dug out a very old Samsung Galaxy Ace running a custom 4.4.2 ROM and for some reason it's crashing due to
org.xmlpull.v1.XmlPullParserException: Binary XML file line #2: invalid drawable tag vector, even though I tested it on an old HP VoiceTab 7 running 4.4.2 before submitting the PR (yeah, I've been digging out all my old devices for testing out Haven 😛 )
I was currently in the process of making most of the same changes I see in your PR #67 like updating the SDKs and build tools and setting vectorDrawables.useSupportLibrary = true, to try and fix it, but if you've already fixed it and it's just waiting to be merged, then it's redundant

@fat-tire
Copy link
Collaborator

fat-tire commented Dec 23, 2017

Yes after trying the things you tried I realized there was already a forward arrow image included in the app, so I just used that. the invalid drawable xml is probably the file is missing.. you can check by inspecting the apk in AS and probably will find it's missing. This seems to be some kind of AS bug. See if my PR fixes it and do report back!

@TheDorkKnightRises
Copy link
Contributor Author

Just tested your updateproj branch on both my API19 devices as well as my primary device running Oreo 8.1, works fine 👍
(Well, did find an issue with initializing the camera on the Galaxy Ace, but that's not related to this matter... will probably create a separate issue tomorrow after checking if a similar case has not already been reported)

@TheDorkKnightRises
Copy link
Contributor Author

Issue fixed in #67

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

Successfully merging this pull request may close these issues.

2 participants