In my Android project app
module, I have this:
implementation 'androidx.appcompat:appcompat:1.5.0
.
And my activity is class AppActivity : AppCompatActivity()
.
Then I changed my theme to material design by adding implementation 'com.google.android.material:material:1.8.0'
At this point I'm not sure if I should delete appcompat
, I think I can't because AppCompatActivity
comes from it. As I want to prove it, so I deleted implementation 'androidx.appcompat:appcompat:1.5.0
, after sync all goes well.
Also I can check the AppCompatActivity
is from appcompat:1.5.0
(sorry for the image is not that clear)
So my question is where is it from as I have deleted it?
To find if it's from any other libraries, I tried add it back but upgrade it to 1.6.1:
implementation 'androidx.appcompat:appcompat:1.6.1'
Then If it's using from any other libraries it should be still 1.5.0.
But I got:
Anyway to know about it? Thanks!
EDIT
As the accepted answer described, use Project structures
-> Dependencies
.
At the first I tried this too but didn't find out my answer, here I expand a bit more. e.g.
I selected: androidx.appcompat:appcompat:1.5.0
Then on the right side Target Module/Artifacts
it shows your module you want to check where's it from. Here is my project image:
Then I know it's from material:1.8.0
I can delete appcompat
anyway. It's not from 3rd party libraries.