Reputation: 163
I have added this resource to my project and it shows me a warning. How can I solve it?
<resources>
<public name = "drawable / abc_vector_test" />
</resources>
The problem still continues (I don't know, if I did it wrong)
Following the suggested documentation (developer.android.com) I have created a file with the name public.xml and in this I have added the resource. Please ask me to explain it step by step since I am a beginner and the android studio documentation is not detailed.
Upvotes: 1
Views: 1507
Reputation: 4039
Please follow the link to make public resource.
The resource @drawable/abc_vector_test
is a private resource of androidX.appcompat:appcompat
library and is intended to be used only by that library. You should not use it.
If you want to use it, copy that resource to your project.
OR
It's just a warning and it won't affect your project, you can disable the warning as below:-
In Gradle file
android {
lintOptions {
disable 'PrivateResource'
}
}
In XML:
tools:ignore="PrivateResource"
In Source code:
@SuppressLint("PrivateResource")
Upvotes: 1