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

Android resource linking failed with 0.26.0 . #1677

Closed
wbearand opened this issue Jan 15, 2019 · 10 comments
Closed

Android resource linking failed with 0.26.0 . #1677

wbearand opened this issue Jan 15, 2019 · 10 comments

Comments

@wbearand
Copy link

wbearand commented Jan 15, 2019

Android API: 28
Mapbox Navigation SDK version: 0.26.0

Steps to trigger behavior

Tried to upgrade my project (after a working on sth else for months) from 0.21.0 to 0.26.0 and took very long due to following error:

Android resource linking failed
C:\Users\............\.gradle\caches\transforms-1\files-1.1\jetified-mapbox-android-navigation-ui-0.26.0.aar\a13b4a3e05a7bf0ff75516399ad7d095\res\layout\navigation_view_layout.xml:10: AAPT: error: attribute mapbox_styleUrl (aka com.............................:mapbox_styleUrl) not found.

I assumed that this was a build error most likely due to my setup.
More confusing though, it works for me now with 0.27.0-SNAPSHOT . Can easily reproduce by switching back.

In the snapshot I am experiencing a native crash though.

In the mentioned file there is app:mapbox_styleUrl="?attr/navigationViewMapStyle", should it be mapbox:mapbox_styleUrl ?

@Guardiola31337
Copy link
Contributor

Hey @wbearand 👋 thanks for reaching out and report your issue.

It seems you run into a compatibility issue. Were you including mapbox-android-sdk 7.x dependency in your build.gradle file in combination with version 0.26.0 of the Navigation SDK by any chance?

By the way, in #1615 we made the Navigation SDK compatible with Maps SDK 7.0 Events 4.0 so in order to fix the issues you're experiencing with 0.27.0-SNAPSHOT I encourage you to check 👀 the Maps 6.x to 7.x migration guide. Note that mapbox_styleUrl has been removed from the list of useable XML attributes and it seems you're still using it which causes the issue you're running into.

Hope this helps a bit.

@danesfeder
Copy link
Contributor

@wbearand have you been able to test with 0.27.0?

@danesfeder
Copy link
Contributor

danesfeder commented Jan 23, 2019

@wbearand going to go ahead and close here. If you still run into issues with 0.27.0 please feel free to re-open or open a new ticket.

@rthomps7
Copy link

I've been having similar issues adding 0.27.0 to my project. Might be something I'm doing, but since this seems so recent I'm wondering if something is up

@danesfeder
Copy link
Contributor

@rthomps7 you're getting the error message from the OP with 0.27.0?

@rthomps7
Copy link

I don't do much native Android development, so it very well may be something I am doing wrong.

With 0.27.0 and the snapshot, I am getting AAPT errors for undefined attributes on my app.

I switched to 0.21.0 and it's building now.

@wbearand
Copy link
Author

@Guardiola31337, @danesfeder : sorry for my late response. thanks for the migration link, yes I suppose that was the issue. I am on 0.28.0 now and looks stable, thanks.

@Guardiola31337
Copy link
Contributor

Hey @rthomps7 👋 could you try with 0.28.0? That solved the issue for @wbearand as commented in #1677 (comment)

@rthomps7
Copy link

rthomps7 commented Feb 1, 2019

@Guardiola31337 - that appears to have fixed it for me as well. :)

@Guardiola31337
Copy link
Contributor

That's awesome! Thanks for the update @rthomps7

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

No branches or pull requests

4 participants