Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Rename access_token resource #3119

Closed

Description

@tobrun

Been thinking a bit about this and it might be a good idea to rename access_token resource:

<resources>
    <string name="access_token">null</string>
</resources>

to

<resources>
    <string name="mapbox_access_token">null</string>
</resources>

Their is always the possibility that the end user or another library, that the end user is using, is overriding the resource by using resource merging. By prepending mapbox to the key we are making a more unique identifier.

Activity

  1. added
    Android
    on Nov 25, 2015
  2. added this to the android-v2.3.0 milestone on Nov 25, 2015
  3. mb12 commented on Nov 25, 2015

    @mb12

    Or we can just add namespace map box to all sdk strings.

    <resources>
        <mapbox name="access_token">null</mapbox>
    </resources>
    
    
  4. tobrun commented on Dec 1, 2015

    @tobrun
    MemberAuthor

    namespace strings are now a supported feature in build.gradle

    screen shot 2015-12-01 at 20 42 42

  5. modified the milestones: android-v2.3.0, on Dec 4, 2015
  6. 1 remaining item

  7. tobrun commented on Feb 17, 2016

    @tobrun
    MemberAuthor

    screen shot 2016-02-17 at 09 09 08

  8. added a commit that references this issue on Feb 17, 2016
  9. bleege commented on Feb 18, 2016

    @bleege
    Contributor

    This is causing an error when at build time, meaning that it's not possible to build from master right now.

    /Users/brad/development/mapbox-gl-android/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_double_map.xml:11:30-57 : AAPT: No resource found that matches the given name (at 'access_token' with value '@string/mapbox_access_token').
    
    /Users/brad/development/mapbox-gl-android/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_double_map.xml:25:34-61 : AAPT: No resource found that matches the given name (at 'access_token' with value '@string/mapbox_access_token').
    
    :MapboxGLAndroidSDKTestApp:processReleaseResources FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':MapboxGLAndroidSDKTestApp:processReleaseResources'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/android/build-tools/23.0.2/aapt'' finished with non-zero exit value 1
  10. reopened this on Feb 18, 2016
  11. added 2 commits that reference this issue on Feb 18, 2016
  12. bleege commented on Feb 18, 2016

    @bleege
    Contributor

    The error turned out to be that when running it locally the key in developer-config.xml needed to be renamed from access_token to mapbox_access_token. I've updated the install docs to better communicate this.

  13. tobrun commented on Feb 19, 2016

    @tobrun
    MemberAuthor

    @bleege, I didn't came to mind that others had to remove/regenerate the file (because it's gitignored..). Apologies!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidbug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions