> Task :presentation:compileDebugKotlin FAILED
e: file:///C:/Users/Minkyu/AndroidStudioProjects/Ratel/android/presentation/build/generated/source/navigation-args/debug/com/project/presentation/view/ListFragmentDirections.kt:9:16 Class 'ActionListFragmentToMemoFragment' is not abstract and does not implement abstract member public abstract fun getActionId(): Int defined in androidx.navigation.NavDirections
e: file:///C:/Users/Minkyu/AndroidStudioProjects/Ratel/android/presentation/build/generated/source/navigation-args/debug/com/project/presentation/view/ListFragmentDirections.kt:12:12 'actionId' overrides nothing
e: file:///C:/Users/Minkyu/AndroidStudioProjects/Ratel/android/presentation/build/generated/source/navigation-args/debug/com/project/presentation/view/ListFragmentDirections.kt:14:12 'arguments' overrides nothing
file:///C:/Users/Minkyu/AndroidStudioProjects/Ratel/android/presentation/build/generated/source/navigation-args/debug/com/project/presentation/view/ListFragmentDirections.kt:9:16 Class 'ActionListFragmentToMemoFragment' is not abstract and does not implement abstract member public abstract fun getActionId(): Int defined in androidx.navigation.NavDirections
file:///C:/Users/Minkyu/AndroidStudioProjects/Ratel/android/presentation/build/generated/source/navigation-args/debug/com/project/presentation/view/ListFragmentDirections.kt:12:12 'actionId' overrides nothing
file:///C:/Users/Minkyu/AndroidStudioProjects/Ratel/android/presentation/build/generated/source/navigation-args/debug/com/project/presentation/view/ListFragmentDirections.kt:14:12 'arguments' overrides nothing
JetPack Navigation을 사용하는데, arguments 전달을 위한 Safe-args 의존성을 추가하다 발생한 오류이다.
분명 의존성을 모두 추가했음에도 불구하고 계속 동일한 이슈가 발생했는데,
이는 프로젝트 레벨의 Safe-args 의존성 버전과 모듈 레벨의 의존성 레벨이 달라서 발생한 문제이다.
둘의 버전을 맞춰주면 해결된다.
// Project
dependencies {
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3'
}
// Module
dependencies {
implementation 'androidx.navigation:navigation-runtime-ktx:2.5.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
}
'개발 > 트러블슈팅' 카테고리의 다른 글
[안드로이드] Jetpack compose dependency 설정 (0) | 2023.07.11 |
---|---|
[안드로이드] FragmentContainerView NullPointerException 해결 (0) | 2023.05.27 |
[안드로이드] Could not resolve com.android.tools.build:gradle:7.4.2 오류 (0) | 2023.04.13 |
[안드로이드] Circular dependency 오류 (0) | 2023.04.13 |
[안드로이드] by viewModels() 종속성 추가 (0) | 2023.04.12 |