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

lint issue with string app_name #14078

Closed
calvarez-ov opened this issue Mar 11, 2019 · 2 comments · Fixed by #14435
Closed

lint issue with string app_name #14078

calvarez-ov opened this issue Mar 11, 2019 · 2 comments · Fixed by #14435
Assignees
Labels
Android Mapbox Maps SDK for Android

Comments

@calvarez-ov
Copy link

Steps to reproduce

  1. Create a new Android project in android studio
  2. Fix all lint issues
  3. Add the mapbox dependency to the app build.gradle
  4. Run lint ./gradlew lintDebug

Expected behavior

No new lint issues appear.

Actual behavior

2 new lint issues appear:
ObsoleteLintCustomCheck:

jetified-mapbox-android-sdk-7.2.0.aar/.../lint.jar: Lint found an issue registry (com.mapbox.mapboxsdk.lint.MapboxIssueRegistry) which did not specify the Lint API version it was compiled with.

This means that the lint checks are likely not compatible.

PrivateResource:

../../src/main/res/values/strings.xml:2: Overriding @string/app_name which is marked as private in com.mapbox.mapboxsdk:mapbox-android-sdk. If deliberate, use tools:override="true", otherwise pick a different name.

 1 <resources>
 2     <string name="app_name">MapboxAppNameLintIssue</string>                                         
 3 </resources>

Configuration

Android versions: Api level 19+
Device models: N/A
Mapbox SDK versions: 7.2.0

More info

Here's a sample project: https://github.com/libon/MapboxLintIssues
Without mapbox, it has no lint issues. Just by adding the gradle dependency to mapbox, two new issues are created.

Note that most projects use the string id app_name for the app name: it's the string id by default created by Android Studio. The mapbox sdk should probably use a different id.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Mar 11, 2019
@LukasPaczos
Copy link
Member

Maps SDK doesn't use "app_name" string resource, but it looks like the gestures library does. What's interesting, adding only the gestures dependency in the example project doesn't trigger the lint warning. Not sure how to verify if this actually is the issue, but we should remove it anyway.

@LukasPaczos
Copy link
Member

First one tackled in #14086, the second one in mapbox/mapbox-gestures-android#62. Let's keep this issue open until we bump the gestures library version.

Thanks for the report!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants