나는 android.support.v4.app.Fragment에서 확장되는 클래스를 가졌다. 문서 android.support.v4.app.Fragment은 onAttachFragment(Fragment childFragment)
이라는 메서드가 있음을 보여 주지만 Android Studio에서는이 메서드를 재정의 할 수 없습니다. 그것은 존재하지 않는 것 같습니다. 그 이유가 있습니까, 아니면 설명서에 오류입니까? android.app.Fragment
비 지원 버전은 API 레벨 24에 추가되었다고 말합니다. 그래도 문제가되지 않습니다. 이후 동일한 클래스를 가진 지원 버전을 사용하고 있습니다.onAttachFragment를 재정의 할 수없는 이유는 무엇입니까?
편집 : 여기 는 build.gradle
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile project(':core-3.2.1')
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.google.android.gms:play-services:7.8+'
compile 'com.microsoft.azure.android:azure-storage-android:[email protected]'
}
'build.gradle' 파일을 포함 할 수 있습니까? 특히 종속성 섹션 – ianhanniballake
내 의존성을 추가했습니다. – ShrimpCrackers
어쩌면 그것은 구문 것입니까? 이 메소드를 오버라이드하려는 클래스 및 클래스를 추가 할 수 있습니까? – petey