Not really. They are compile-time dependencies. In your compiled APK, there is no significant difference between:
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile project(':facebook')
, where you cloned a GitHub repo or something to give you a local library project as opposed to referencing an artifact from a repository
having a bunch of classes with Facebook's name and package in your app that you wrote (ditto a bunch of resources)
If you are writing the app, and you are using different build types and/or product flavors, and you have different dependencies for each, you can use BuildConfig
to detect which build variant you are running.
If you are writing a library, and you want to determine at runtime if the developer added a certain dependency, the best you can do is sniff around to see if certain things exist from that dependency and if they match your expectations. The details for this will vary by dependency (e.g., seeing if Play Services exists would have one set of hard-coded checks; seeing if the Facebook SDK exists would have a separate set of hard-coded checks). This will not distinguish between my three bullets above, but it is the best that you are going to be able to do.