Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android : AdMessageCodec.java uses or overrides a deprecated API #1242

Open
Tom3652 opened this issue Jan 24, 2025 · 1 comment
Open

Android : AdMessageCodec.java uses or overrides a deprecated API #1242

Tom3652 opened this issue Jan 24, 2025 · 1 comment

Comments

@Tom3652
Copy link

Tom3652 commented Jan 24, 2025

[REQUIRED] Step 1: Describe your environment

Plugin Version

google_mobile_ads: 5.3.0

[REQUIRED] Step 2: Describe the problem

When building for Android, i see this warning :

Note: /Users/foxtom/.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/android/src/main/java/io/flutter/plugins/googlemobileads/AdMessageCodec.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Steps to Reproduce

  1. Build the app on Android device

Expected results:

The code should not be using deprecated APIs

Actual results:

A warning that the code is using a deprecated API

Logs
Note: /Users/foxtom/.pub-cache/hosted/pub.dev/google_mobile_ads-5.3.0/android/src/main/java/io/flutter/plugins/googlemobileads/AdMessageCodec.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[✓] Flutter (Channel stable, 3.27.3, on macOS 15.2 24C101 darwin-x64, locale fr-FR)
    • Flutter version 3.27.3 on channel stable at /Users/foxtom/Desktop/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c519ee916e (3 days ago), 2025-01-21 10:32:23 -0800
    • Engine revision e672b006cb
    • Dart version 3.6.1
    • DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/foxtom/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)

[✓] VS Code (version 1.96.4)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (5 available)
    • moto g 8 power (mobile)   • 192.168.1.23:39709        • android-arm64  • Android 11 (API 30)
    • Now You See Me (mobile)   • 00008020-001204401E78002E • ios            • iOS 18.2.1 22C161
    • macOS (desktop)           • macos                     • darwin-x64     • macOS 15.2 24C101 darwin-x64
    • Chrome (web)              • chrome                    • web-javascript • Google Chrome 131.0.6778.265


[✓] Network resources
    • All expected network resources are available.

• No issues found!
@minhtaama
Copy link

I got the same problem when running assembleRelease, but Debug works fine. Downgrading to 5.2.0 fixes the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants