본문 바로가기

android

[Flutter] Android Studio, Note: Recompile with -Xlint:deprecation for details.

728x90

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

 

deprecated API가 있다는 노트이며 -Xlint:deprecation옵션을 설정하면 자세한 이유를 확인할 수 있다.

 

project/android/build.gradle

allprojects {
    tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
    }
    repositories {
        google()
        jcenter()
    }
}

 

플러터에서 pub.dev/packages/google_mobile_ads를 사용하는데 최신 소스는 InterstitialAd가 제거되어 워닝이 발생되었다.

 

pub.dartlang.org/google_mobile_ads-0.12

FlutterInterstitialAd.java:70: warning: [deprecation]

43 warnings

 

구글 Release Notes

VersionRelease DateNotes

20.1.0 2021‑04‑29
20.0.0 2021‑04‑05 This release is a MAJOR version update with several breaking changes. See the prepare for SDK v20 guide for more information on how to migrate.
  • Breaking changes:
    • Removed legacy Interstitial API.
    • Removed legacy RewardedVideoAd API.
    • Removed classes prefixed with Publisher (e.g.: PublisherAdView).
    • Removed CustomRenderedAd.
    • Removed InstreamAd.
    • Removed SearchAdRequest.
    • Removed AdListener.onAdLeftApplication().
    • Removed NativeAppInstallAd, NativeContentAd, and UnifiedNativeAd. There is now one native ad format named NativeAd.
    • RewardedAd is now an abstract class. Use the RewardedAd.load() static method to load a rewarded ad.
  • Added ad inspector (Beta).
  • Deprecated AdSize.SMART_BANNER in favor of adaptive banner ads.
  • Added explicit nullability annotations on all public APIs.

 

Interstitial API가 제거  되어 발생.

반응형

'android' 카테고리의 다른 글