ShrimpCrackers ShrimpCrackers - 1 year ago 127
Android Question

Why can't I override onAttachFragment?

I have a class extending from The documentation shows that there is a method called

onAttachFragment(Fragment childFragment)
, but I can't override it in Android Studio. It's like it doesn't exist. Is there a reason for this, or is this an error in documentation?
non-support version says it has been added in API level 24. That shouldn't matter though should it? Since I am using the support version which has the same class.

Here are my dependencies in build.gradle

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile project(':core-3.2.1')
compile ''
compile ''
compile ''
compile ''
compile ''

Answer Source

You're using the 23.4.0 release of the Support Library. Only the 24.X (i.e., 24.1.1) versions of the Support Library will contain the equivalent APIs added in API 24.

You'll need to upgrade your version of the Support Library to use the new APIs.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download