Use @Suppress
annotation with argument "DEPRECATION"
:
@Suppress("DEPRECATION")
someObject.theDeprecatedFunction()
Instead of a single statement, you can also mark a function, a class or a file (@file:Suppress("DEPRECATION")
in its beginning) with the annotation to suppress all the deprecation warnings issued there.
In IntelliJ IDEA this can also be done through Alt+Enter menu with caret placed on code with deprecation warning.
Related Contents:
- A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
- No Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator
- How to call a function after delay in Kotlin?
- Outdated Kotlin Runtime warning in Android Studio
- RegisterResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
- Android P visibilityawareimagebutton.setVisibility can only be called from the same library group
- Kotlin Android start new Activity
- Could not find method kapt() for arguments
- Room Persistence: Error:Entities and Pojos must have a usable public constructor
- Close/hide the Android Soft Keyboard with Kotlin
- Not able to “findViewById” in Kotlin. Getting error “Type inference failed”
- How to use @Parcelize now that kotlin-android-extensions is being deprecated?
- Kotlin: Iterate through a JSONArray
- material-1.5.0-alpha03\res\values-v31\values-v31.xml:3:5-94: AAPT: error: resource android:color/system_neutral1_1000 not found
- Singleton class in Kotlin
- Type ‘State’ has no method ‘getValue(Nothing?, KProperty)’ and thus it cannot serve as a delegate
- activeNetworkInfo.type is deprecated in API level 28
- Kotlin and idiomatic way to write, ‘if not null, else…’ based around mutable value
- How to create a simple countdown timer in Kotlin?
- ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1
- How to resolve the error “LifecycleOwners must call register before they are STARTED”
- New Gradle Sync is not supported due to containing Kotlin modules using an unsupported plugin version
- Run single kotlin class with main function in android studio
- Android build warning Mapping new ns to old ns
- ‘by viewModels()’ Kotlin property delegate unresolved reference
- Android Kotlin onItemSelectedListener for spinner not working
- How to Exponential Backoff retry on kotlin coroutines
- Kotlin – custom dialog in Android
- Unable to find method ”void com.android.build.api.extension.AndroidComponentsExtension$DefaultImpls.androidTest$default(com.android.build
- Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent, On AlarmPingSender
- Updated to Android Studio 3.0. Getting a “Kotlin not configured” error
- The ‘kotlin-android-extensions’ Gradle plugin is deprecated
- Is ‘constructor LocationRequest()’ deprecated in google maps v2?
- Suppress “Identifier not allowed in Android”
- lateinit modifier is not allowed on primitive type properties in Kotlin
- Remove character from string in Kotlin
- Android app link not working in android 12 always opening in browser
- Unresolved reference: viewModelScope – Kotlin Android
- data binding – safeUnbox warning
- How to save enum field in the database room?
- This type has a constructor and must be initialized here – Kotlin
- Use group in ConstraintLayout to listen for click events on multiple views
- failed to find style ‘cardView Style’ in current theme
- Check internet connectivity android in kotlin
- Unresolved reference DaggerApplicationComponent
- How to use Kotlin with Proguard
- How do I resolve error message: “Inheritance from an interface with ‘@JvmDefault’ members is only allowed with -Xjvm-default option”
- @composable invocations can only happen from the context of an @composable function
- Kotlin: lateinit to val, or, alternatively, a var that can set once
- Exposed drop-down menu for jetpack compose