gradle error : colliding attributes
Open
Nobody has claimed this yet.
- Dominant language
- Objective-C++
- Stars
- 2.7k
- Forks
- 734
- Avg merge
- 11h 39m
- Merged PRs (30d)
- 1
Description
I am using the NatShare plugin in my project, but when I try to build, I am getting a 'colliding attributes' error. I want to try adding 'tools:replace="android:authorities" and 'tools:replace="android:resource" as Suggestion, but how do I write it correctly?
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
/Library/Bee/Android/Prj/IL2CPP/Gradle/launcher/src/main/AndroidManifest.xml:81:13-74 Error:
Attribute provider#androidx.core.content.FileProvider@authorities value=(jp.example.unitywebview.fileprovider) from [:unityLibrary] AndroidManifest.xml:81:13-74 is also present at [:NatShare:] AndroidManifest.xml:17:13-60 value=(jp.example.natshare).
Suggestion: add 'tools:replace="android:authorities"' to <provider> element at AndroidManifest.xml:78:9-88:20 to override.
/Library/Bee/Android/Prj/IL2CPP/Gradle/launcher/src/main/AndroidManifest.xml:87:17-73 Error: Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/unitywebview_file_provider_paths) from [:unityLibrary] AndroidManifest.xml:87:17-73 is also present at [:NatShare:] AndroidManifest.xml:22:17-50 value=(@xml/filepaths).
Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml to override.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with launcher/src/main/AndroidManifest.xml at the provider and meta-data entries identified in the build output, then compare them with NatShare's AndroidManifest.xml. Reproduce the Gradle build and verify that the manifest merge completes without the colliding attributes error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, unity
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100