Skip to content

[google_maps_flutter] io.flutter.view has been deprecated #117765

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

Closed
sisalik1 opened this issue Dec 29, 2022 · 9 comments
Closed

[google_maps_flutter] io.flutter.view has been deprecated #117765

sisalik1 opened this issue Dec 29, 2022 · 9 comments
Labels
found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: maps Google Maps plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-android Android applications specifically r: fixed Issue is closed as already fixed in a newer version team-android Owned by Android platform team triaged-android Triaged by Android platform team

Comments

@sisalik1
Copy link

Steps to Reproduce

  • Add google_maps_flutter:^2.2.2 as dependency
  • Run flutter build appbundle
  • Be presented with warnings during first build

Expected results:
No warnings

Actual results:

...\google_maps_flutter_android-2.4.0\android\src\main\java\io\flutter\plugins\googlemaps\Convert.java:27: warning: [deprecation] FlutterMain in io.flut
ter.view has been deprecated
import io.flutter.view.FlutterMain;
                      ^
1 warning
Logs
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 3.7.0-13.0.pre.106, on Microsoft Windows [Version 10.0.19044.2364], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.3)
[√] Connected device (2 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.

@exaby73 exaby73 added the in triage Presently being triaged by the triage team label Dec 29, 2022
@exaby73
Copy link
Member

exaby73 commented Dec 29, 2022

Hello @sisalik1. The only message I see is:

Note: /Users/nabeelparkar/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter_android-2.4.0/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

I do not see io.flutter.view.FlutterMain explicitly mentioned

@exaby73 exaby73 added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 29, 2022
@sisalik1
Copy link
Author

Where do you see this? I don't see this.

@sisalik1 sisalik1 reopened this Dec 29, 2022
@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 29, 2022
@exaby73
Copy link
Member

exaby73 commented Dec 29, 2022

I created a new project and ran flutter pub add google_maps_flutter then flutter build appbundle

@exaby73 exaby73 added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 29, 2022
@sisalik1
Copy link
Author

sisalik1 commented Jan 1, 2023

Happy new year!
What if you try this: ./gradlew assembleDebug

> Task :google_maps_flutter_android:compileDebugJavaWithJavac
...\.pub-cache\hosted\pub.dartlang.org\google_maps_flutter_android-2.4.0\android\src\main\java\io\flutter\plugins\googlemaps\Convert.java:27: warning: [deprecation] FlutterMain in io.flutter
.view has been deprecated
import io.flutter.view.FlutterMain;
                      ^

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 1, 2023
@darshankawar
Copy link
Member

Thanks for the update. Using ./gradlew assembleDebug, I do see the warning as mentioned above.

\android\src\main\java\io\flutter\plugins\googlemaps\Convert.java:27: warning: [deprecation] FlutterMain in io.flutter
.view has been deprecated
import io.flutter.view.FlutterMain;
                      ^

A similar issue was fixed earlier: #90969

@darshankawar darshankawar added platform-android Android applications specifically plugin p: maps Google Maps plugin has reproducible steps The issue has been confirmed reproducible and is ready to work on found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 and removed in triage Presently being triaged by the triage team labels Jan 2, 2023
@stuartmorgan-g
Copy link
Contributor

This is for v1 embedding compatibility; we should be suppressing the warning for as long as this code exists (although that shouldn't be too much longer, IIRC we can remove v1 support from 1P plugins after then next release.)

@stuartmorgan-g stuartmorgan-g added the P2 Important issues not at the top of the work list label Jan 3, 2023
@sisalik1

This comment was marked as duplicate.

@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
@Hixie Hixie removed the plugin label Jul 6, 2023
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-android Owned by Android platform team triaged-android Triaged by Android platform team labels Jul 8, 2023
@stuartmorgan-g
Copy link
Contributor

Fixed in flutter/packages#6494

@darshankawar darshankawar added the r: fixed Issue is closed as already fixed in a newer version label Jan 28, 2025
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: maps Google Maps plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-android Android applications specifically r: fixed Issue is closed as already fixed in a newer version team-android Owned by Android platform team triaged-android Triaged by Android platform team
Projects
None yet
Development

No branches or pull requests

5 participants